org.apache.jackrabbit.uuid
Class UUID

java.lang.Object
  extended by org.apache.jackrabbit.uuid.UUID
All Implemented Interfaces:
Serializable, Comparable, Constants

Deprecated. This class will be removed in Jackrabbit 2.0. Use java.util.UUID instead.

public class UUID
extends Object
implements Constants, Serializable, Comparable

UUID represents a Universally Unique IDentifier per IETF RFC 4122 ("A Universally Unique IDentifier (UUID) URN Namespace"), Section 4.

This is a lightweight implementation of an UUID, disregarding the different versions of UUIDs.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.apache.jackrabbit.uuid.Constants
CLOCK_SEQ_HI_AND_RESERVED_BYTE_8, FORMAT_POSITION1, FORMAT_POSITION2, FORMAT_POSITION3, FORMAT_POSITION4, hexDigits, TIME_HI_AND_VERSION_BYTE_6, TIME_HI_BYTE_LEN, TIME_HI_START_POS, TIME_HI_TS_POS, TIME_LOW_BYTE_LEN, TIME_LOW_START_POS, TIME_LOW_TS_POS, TIME_MID_BYTE_LEN, TIME_MID_START_POS, TIME_MID_TS_POS, TOKEN_LENGTHS, TOKENS_IN_UUID, URN_PREFIX, UUID_BIT_LENGTH, UUID_BYTE_LENGTH, UUID_FORMATTED_LENGTH, UUID_UNFORMATTED_LENGTH, VARIANT_FUTURE, VARIANT_IETF_DRAFT, VARIANT_MS, VARIANT_NCS_COMPAT, VERSION_FOUR, VERSION_ONE, VERSION_THREE, VERSION_TWO, WRONG_VAR_VER_MSG
 
Constructor Summary
UUID(byte[] b)
          Deprecated. Constructs a UUID from a 16 byte array.
UUID(DataInput input)
          Deprecated. Constructs a UUID from a DataInput.
UUID(long mostSignificant, long leastSignificant)
          Deprecated. Constructs a UUID from two long values in most significant byte, and least significant bytes order.
UUID(String uuidString)
          Deprecated. Constructs a UUID from a UUID formatted String.
 
Method Summary
 int compareTo(Object compareTo)
          Deprecated. Compares two UUIDs.
 boolean equals(Object obj)
          Deprecated. Compares two UUID for equality.
static UUID fromString(String uuidString)
          Deprecated. Parses a string for a UUID.
 long getLeastSignificantBits()
          Deprecated. Returns the least significant bits stored in the uuid's internal structure.
 long getMostSignificantBits()
          Deprecated. Returns the most significant bits stored in the uuid's internal structure.
 byte[] getRawBytes()
          Deprecated. Returns a copy of the byte values contained in this UUID.
 int hashCode()
          Deprecated. Returns a hash code value for the object.
static UUID randomUUID()
          Deprecated. Returns a new version 4 UUID, based upon Random bits.
 String toString()
          Deprecated. Returns a string representation of the UUID.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UUID

public UUID(byte[] b)
     throws IllegalArgumentException
Deprecated. 
Constructs a UUID from a 16 byte array.

Parameters:
b - the 16 byte array to construct this UUID from.
Throws:
IllegalArgumentException - argument must be 16 bytes

UUID

public UUID(DataInput input)
     throws IOException
Deprecated. 
Constructs a UUID from a DataInput. Note if 16 bytes are not available this method will block.

Parameters:
input - the datainput with 16 bytes to read in from.
Throws:
IOException - exception if there is an IO problem also argument must contain 16 bytes.

UUID

public UUID(long mostSignificant,
            long leastSignificant)
Deprecated. 
Constructs a UUID from two long values in most significant byte, and least significant bytes order.

Parameters:
mostSignificant - the most significant 8 bytes of the uuid to be constructed.
leastSignificant - the least significant 8 bytes of the uuid to be constructed.

UUID

public UUID(String uuidString)
     throws IllegalArgumentException
Deprecated. 
Constructs a UUID from a UUID formatted String.

Parameters:
uuidString - the String representing a UUID to construct this UUID
Throws:
IllegalArgumentException - String must be a properly formatted UUID string
Method Detail

fromString

public static UUID fromString(String uuidString)
                       throws IllegalArgumentException
Deprecated. 
Parses a string for a UUID.

Parameters:
uuidString - the UUID formatted String to parse.
Returns:
Returns a UUID or null if the formatted string could not be parsed.
Throws:
IllegalArgumentException - the String must be a properly formatted UUID String.

toString

public String toString()
Deprecated. 
Returns a string representation of the UUID.

Overrides:
toString in class Object
Returns:
a string representation of the UUID formatted according to the specification.

equals

public boolean equals(Object obj)
Deprecated. 
Compares two UUID for equality.

Overrides:
equals in class Object
See Also:
Object.equals(Object)

hashCode

public int hashCode()
Deprecated. 
Returns a hash code value for the object.

Overrides:
hashCode in class Object
See Also:
Object.hashCode()

compareTo

public int compareTo(Object compareTo)
              throws ClassCastException
Deprecated. 
Compares two UUIDs.

Specified by:
compareTo in interface Comparable
Throws:
ClassCastException
See Also:
Comparable.compareTo(Object)

getLeastSignificantBits

public long getLeastSignificantBits()
Deprecated. 
Returns the least significant bits stored in the uuid's internal structure.

Returns:
the least significant bits stored in the uuid's internal structure.

getMostSignificantBits

public long getMostSignificantBits()
Deprecated. 
Returns the most significant bits stored in the uuid's internal structure.

Returns:
the most significant bits stored in the uuid's internal structure.

getRawBytes

public byte[] getRawBytes()
Deprecated. 
Returns a copy of the byte values contained in this UUID.

Returns:
a copy of the byte values contained in this UUID.

randomUUID

public static UUID randomUUID()
Deprecated. 
Returns a new version 4 UUID, based upon Random bits.

Returns:
a new version 4 UUID, based upon Random bits.


Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.