com.starteam.util
Class GUID

java.lang.Object
  extended by com.starteam.util.GUID
All Implemented Interfaces:
java.io.Serializable

public final class GUID
extends java.lang.Object
implements java.io.Serializable

Generates a Globally unique identifier

See Also:
Serialized Form

Constructor Summary
GUID()
          Creates a GUID isntance
GUID(byte[] source)
          Creates a GUID based on the byte array
GUID(java.lang.String spec)
          Creates a GUID based on the given specification
 
Method Summary
 void create()
           
 boolean equals(java.lang.Object o)
          Compares this GUID instance with the Object o
 java.lang.String getByteString()
          Returns a string representation of the integer argument as an unsigned integer in base 16.
 java.lang.String getCanonicalFormat()
          Returns the canonical string representation of this GUID.
 byte[] getData()
           
 java.lang.String getDebugString()
          Returns the canonical string representation of the GUID for debug purposes.
 int hashCode()
          Returns the hashcode of the GUID.
 java.lang.String toString()
          Returns the canonical string representation of the GUID.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GUID

public GUID()
Creates a GUID isntance


GUID

public GUID(byte[] source)
Creates a GUID based on the byte array

Parameters:
source - byte array

GUID

public GUID(java.lang.String spec)
Creates a GUID based on the given specification

Parameters:
spec - specification
Method Detail

create

public void create()

getByteString

public java.lang.String getByteString()
Returns a string representation of the integer argument as an unsigned integer in base 16.

Returns:
hex representation of the GUID

getData

public byte[] getData()

equals

public boolean equals(java.lang.Object o)
Compares this GUID instance with the Object o

Overrides:
equals in class java.lang.Object
Parameters:
o - the Object to compare with for equality
Returns:
true if o is identical to this GUID

hashCode

public int hashCode()
Returns the hashcode of the GUID.

Overrides:
hashCode in class java.lang.Object
Returns:
hashcode of the GUID.

getCanonicalFormat

public java.lang.String getCanonicalFormat()
Returns the canonical string representation of this GUID. It will be of the form: 0201a8c0-dc96-68d9-97dc-d968e6000000 Note that this string representation is cached and may be called repeatedly without allocating a new String object for each call.


toString

public java.lang.String toString()
Returns the canonical string representation of the GUID.

Overrides:
toString in class java.lang.Object
Returns:
canonical string

getDebugString

public java.lang.String getDebugString()
Returns the canonical string representation of the GUID for debug purposes.

Returns:
canonical string


StarTeam SDK 14.0, Build 21
Copyright © 2003-2012 Borland Software Corporation. All rights reserved.