org.eclipse.core.internal.utils
Class UniversalUniqueIdentifier

java.lang.Object
  extended by org.eclipse.core.internal.utils.UniversalUniqueIdentifier
All Implemented Interfaces:
java.io.Serializable

public class UniversalUniqueIdentifier
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
static int BYTE_MASK
           
static int BYTES_SIZE
           
static int CLOCK_SEQUENCE_HIGH_AND_RESERVED
           
static int CLOCK_SEQUENCE_LOW
           
static int HIGH_NIBBLE_MASK
           
static int LOW_NIBBLE_MASK
           
static int MAX_CLOCK_ADJUSTMENT
           
static int MAX_CLOCK_SEQUENCE
           
static int NODE_ADDRESS_BYTE_SIZE
           
static int NODE_ADDRESS_START
           
static int SHIFT_NIBBLE
           
static int ShiftByte
           
static int TIME_FIELD_START
           
static int TIME_FIELD_STOP
           
static int TIME_HIGH_AND_VERSION
           
static byte[] UNDEFINED_UUID_BYTES
           
 
Constructor Summary
UniversalUniqueIdentifier()
          UniversalUniqueIdentifier default constructor returns a new instance that has been initialized to a unique value.
UniversalUniqueIdentifier(byte[] byteValue)
          Constructor that accepts the bytes to use for the instance.   The format of the byte array is compatible with the toBytes() method.
 
Method Summary
 java.lang.Object clone()
          Simply increases the visibility of Object's clone.
static int compareTime(byte[] fBits1, byte[] fBits2)
           
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
 byte[] toBytes()
          This representation is compatible with the (byte[]) constructor.
 java.lang.String toString()
           
 java.lang.String toStringAsBytes()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

BYTES_SIZE

public static final int BYTES_SIZE
See Also:
Constant Field Values

UNDEFINED_UUID_BYTES

public static final byte[] UNDEFINED_UUID_BYTES

MAX_CLOCK_SEQUENCE

public static final int MAX_CLOCK_SEQUENCE
See Also:
Constant Field Values

MAX_CLOCK_ADJUSTMENT

public static final int MAX_CLOCK_ADJUSTMENT
See Also:
Constant Field Values

TIME_FIELD_START

public static final int TIME_FIELD_START
See Also:
Constant Field Values

TIME_FIELD_STOP

public static final int TIME_FIELD_STOP
See Also:
Constant Field Values

TIME_HIGH_AND_VERSION

public static final int TIME_HIGH_AND_VERSION
See Also:
Constant Field Values

CLOCK_SEQUENCE_HIGH_AND_RESERVED

public static final int CLOCK_SEQUENCE_HIGH_AND_RESERVED
See Also:
Constant Field Values

CLOCK_SEQUENCE_LOW

public static final int CLOCK_SEQUENCE_LOW
See Also:
Constant Field Values

NODE_ADDRESS_START

public static final int NODE_ADDRESS_START
See Also:
Constant Field Values

NODE_ADDRESS_BYTE_SIZE

public static final int NODE_ADDRESS_BYTE_SIZE
See Also:
Constant Field Values

BYTE_MASK

public static final int BYTE_MASK
See Also:
Constant Field Values

HIGH_NIBBLE_MASK

public static final int HIGH_NIBBLE_MASK
See Also:
Constant Field Values

LOW_NIBBLE_MASK

public static final int LOW_NIBBLE_MASK
See Also:
Constant Field Values

SHIFT_NIBBLE

public static final int SHIFT_NIBBLE
See Also:
Constant Field Values

ShiftByte

public static final int ShiftByte
See Also:
Constant Field Values
Constructor Detail

UniversalUniqueIdentifier

public UniversalUniqueIdentifier()
UniversalUniqueIdentifier default constructor returns a new instance that has been initialized to a unique value.


UniversalUniqueIdentifier

public UniversalUniqueIdentifier(byte[] byteValue)
Constructor that accepts the bytes to use for the instance.   The format of the byte array is compatible with the toBytes() method.

The constructor returns the undefined uuid if the byte array is invalid.

See Also:
toBytes(), BYTES_SIZE
Method Detail

clone

public java.lang.Object clone()
Simply increases the visibility of Object's clone. Otherwise, no new behaviour.

Overrides:
clone in class java.lang.Object

compareTime

public static int compareTime(byte[] fBits1,
                              byte[] fBits2)

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toBytes

public byte[] toBytes()
This representation is compatible with the (byte[]) constructor.

See Also:
UniversalUniqueIdentifier(byte[])

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toStringAsBytes

public java.lang.String toStringAsBytes()