Skip navigation links

Oracle Internet Directory API Reference
11g Release 1 (11.1.1)

E10664-01


oracle.ldap.util
Class Guid

java.lang.Object
  extended by oracle.ldap.util.Guid

All Implemented Interfaces:
java.lang.Cloneable

public final class Guid
extends java.lang.Object
implements java.lang.Cloneable

Field Summary
static int GUID_BYTE_SIZE
          number of bytes in a GUID
static int GUID_STRING_SIZE
          length of GUID string representation
static int GUID_STRING_SIZE_NEW
          length of GUID compact string reprentation

 

Constructor Summary
Guid()
          Creates a Guid object
Guid(byte[] byte_array)
          Construct a Guid from a byte array
Guid(java.lang.String guidHexString)
          Construct a Guid from its string representation

 

Method Summary
 java.lang.Object clone()
          Clones a Guid object
 boolean equals(Guid guid)
          Compare the Guid for equality with this guid
 boolean equals(java.lang.Object o)
          Compare the Object for equality with this guid
 byte[] getBytes()
          return the byte array form of the Guid
 int hashCode()
          return the hashcode of this object for hashing purposes
static void main(java.lang.String[] argv)
          main function used for testing retained from old implementation for compatibility
static Guid newInstance()
          generates a new Guid Object.
 java.lang.String toString()
          Retrieves the Guid in a string format

 

Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

 

Field Detail

GUID_BYTE_SIZE

public static final int GUID_BYTE_SIZE
number of bytes in a GUID
See Also:
Constant Field Values

GUID_STRING_SIZE

public static final int GUID_STRING_SIZE
length of GUID string representation
See Also:
Constant Field Values

GUID_STRING_SIZE_NEW

public static final int GUID_STRING_SIZE_NEW
length of GUID compact string reprentation
See Also:
Constant Field Values

Constructor Detail

Guid

public Guid()
Creates a Guid object

Guid

public Guid(java.lang.String guidHexString)
Construct a Guid from its string representation
Parameters:
guidHexString - a non null Hex string representing a Globally Unique Identifier. The string can be either in the expanded or compact form

Guid

public Guid(byte[] byte_array)
Construct a Guid from a byte array
Parameters:
byte_array - an array of bytes representing a GUID. This constructor will validate the length of the byte array before proceeding.

Method Detail

newInstance

public static Guid newInstance()
generates a new Guid Object. This Guid is unique across time and space
Returns:
a new instance of the Guid class

getBytes

public byte[] getBytes()
return the byte array form of the Guid
Returns:
a byte array containing the Guid bytes

toString

public final java.lang.String toString()
Retrieves the Guid in a string format
Overrides:
toString in class java.lang.Object
Returns:
the Guid in a string format

equals

public boolean equals(java.lang.Object o)
Compare the Object for equality with this guid
Overrides:
equals in class java.lang.Object
Parameters:
o - object to be compared for equality
Returns:
true if they are equal, false otherwise

equals

public boolean equals(Guid guid)
Compare the Guid for equality with this guid
Parameters:
guid - object to be compared for equaity
Returns:
true if they are equal, false otherwise

hashCode

public int hashCode()
return the hashcode of this object for hashing purposes
Overrides:
hashCode in class java.lang.Object
Returns:
the integer hashcode of the Guid

clone

public java.lang.Object clone()
Clones a Guid object
Overrides:
clone in class java.lang.Object
Returns:
a clone of an existing Guid object

main

public static void main(java.lang.String[] argv)
main function used for testing retained from old implementation for compatibility

Skip navigation links

Oracle Internet Directory API Reference
11g Release 1 (11.1.1)

E10664-01


Copyright © 1999, 2009 Oracle. All Rights Reserved.