public final class Guid
extends java.lang.Object
implements java.io.Serializable
UUID
. A UUID represents a 128-bit value and is either guaranteed to be different from all other
UUIDs/GUIDs generated until 3400 A.D., or extremely likely to be different. UUID
, i.e., an UUID
of version type 4, see
UUID.version()
.UUID
,
Serialized FormConstructor and Description |
---|
Guid()
Constructs a new
Guid . |
Guid(java.lang.String guid)
Constructs a new
Guid using the specified guid string representation as described in the
Guid.toString() method. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Compares this object to the supplied object.
|
int |
hashCode()
Returns a hash code for this
Guid . |
static boolean |
isGuid(java.lang.String guid)
Tells whether or not the supplied guid string corresponds to a valid
Guid . |
static Guid |
parseGuid(java.lang.String guid)
Constructs a new
Guid using the specified guid string representation as described in the
Guid.toString() method. |
java.lang.String |
toString()
Returns a
String representation of this Guid . |
public Guid()
Guid
.public Guid(java.lang.String guid)
Guid
using the specified guid string representation as described in the
Guid.toString()
method.guid
- a string that specifies a Guid
.java.lang.IllegalArgumentException
- if guid does not conform to the string representation of a Guid
as
described in Guid.toString()
.public static Guid parseGuid(java.lang.String guid)
Guid
using the specified guid string representation as described in the
Guid.toString()
method.guid
- a string that specifies a Guid
.Guid
with the specified value.java.lang.IllegalArgumentException
- if guid does not conform to the string representation of a Guid
as
described in Guid.toString()
.public static boolean isGuid(java.lang.String guid)
Guid
.guid
- a string that specifies a Guid
.true
if guid corresponds to a valid Guid
, false
otherwise.public boolean equals(java.lang.Object obj)
true
if the argument it not
null
, it is of type Guid
and it contains the same value as this Guid
.equals
in class java.lang.Object
obj
- the object to compare with.true
if the objects are the same, false
otherwisepublic int hashCode()
Guid
.hashCode
in class java.lang.Object
Guid
.public java.lang.String toString()
String
representation of this Guid
. The Guid
string representation
is on the following format, where x represents a hexadecimal ([0-9][a-f][A-F]) digit,
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx". toString
in class java.lang.Object
String
representation of this Guid
.UUID.toString()
Copyright © 2000-2020 TIBCO Software Inc. All Rights Reserved.