com.spotfire.server.util
Class Guid

java.lang.Object
  extended by com.spotfire.server.util.Guid

public final class Guid
extends Object

This class represents UUIDs (Univerally Unique IDentifier), also known as GUIDs (Globaly Unique IDentifier). A UUID is 128 bit long and is either guaranteed to be different from all other UUIDs/GUIDs generated until 3400 A.D., or extremely likely to be different.

Since:
DSS 7.3

Constructor Summary
Guid(String guid)
          Public constructor.
 
Method Summary
 boolean equals(Object object)
          Compares this object to another object of type Guid.
 int hashCode()
          Returns a hashcode for this Guid.
static Guid parseGuid(String guid)
          Parses the guid string argument and returns a new Guid instance.
 String toString()
          Returns a String representation of this Guid object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Guid

public Guid(String guid)
Public constructor. Use this constructor to recreate a guid from a string. The format for the Guid string should be "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" or "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx" where x equals a hexadecimal digit.

Parameters:
guid - the guid on on a string format
Throws:
IllegalArgumentException - if the guid parameter has the wrong format
Method Detail

parseGuid

public static Guid parseGuid(String guid)
Parses the guid string argument and returns a new Guid instance.

Parameters:
guid - a string representing a guid
Returns:
a new Guid instance
Throws:
IllegalArgumentException - if the guid string has the wrong format

equals

public boolean equals(Object object)
Compares this object to another object of type Guid.

Overrides:
equals in class Object
Parameters:
object - the object to be compared
Returns:
true if the objects are equal, false otherwise

hashCode

public int hashCode()
Returns a hashcode for this Guid.

Overrides:
hashCode in class Object
Returns:
a hash code value for this object.

toString

public String toString()
Returns a String representation of this Guid object.

Overrides:
toString in class Object
Returns:
a String representation of this Guid object


Copyright © 2000-2009 TIBCO Software Inc. All Rights Reserved.