Skip navigation links

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

E10664-01


oracle.ldap.util
Class OrclGuid

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

All Implemented Interfaces:
java.lang.Cloneable

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

This class represents GUIDs (Globally Unique Identifiers), or object IDs. This is an immutable class.


Constructor Summary
OrclGuid()
          Constructs a OrclGuid instance from a string
OrclGuid(byte[] byte_array)
          Constructs an OrclGuid instance from a byte array
OrclGuid(java.lang.String string_guid)
          Constructs a OrclGuid instance from a string

 

Method Summary
 java.lang.Object clone()
          Returns a clone this OrclGuid object
static java.lang.String compactGuidString(java.lang.String s)
          Converts the larger version of the GUID String to a more compact version.
 boolean equals(java.lang.Object o)
          Compares this OrclGuid with another OrclGuid in a string format
static java.lang.String expandGuidString(java.lang.String s)
          Expands the compact version of the GUID String to a more readable version.
 byte[] getBytes()
          Returns the 'byte' form of the Guid
 int hashCode()
          Returns the hashcode of this object for hashing purposes
static void main(java.lang.String[] argv)
          main function used for testing
static OrclGuid newInstance()
          Returns a new OrclGuid instance
 java.lang.String toString()
          Returns the Guid in a string format

 

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

 

Constructor Detail

OrclGuid

public OrclGuid()
Constructs a OrclGuid instance from a string

OrclGuid

public OrclGuid(java.lang.String string_guid)
Constructs a OrclGuid instance from a string
Parameters:
string_guid - a string representation of a Globally Unique Identifier

OrclGuid

public OrclGuid(byte[] byte_array)
Constructs an OrclGuid instance 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 OrclGuid newInstance()
Returns a new OrclGuid instance
Returns:
a new instance of the OrclGuid class

getBytes

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

toString

public final java.lang.String toString()
Returns 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)
Compares this OrclGuid with another OrclGuid in a string format
Overrides:
equals in class java.lang.Object
Returns:
true if they are equal, false otherwise

hashCode

public int hashCode()
Returns 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()
Returns a clone this OrclGuid object
Overrides:
clone in class java.lang.Object
Returns:
a clone of an existing Guid object

compactGuidString

public static java.lang.String compactGuidString(java.lang.String s)
Converts the larger version of the GUID String to a more compact version.
Parameters:
s - a valid GUID string
Returns:
the compacted GUID string

expandGuidString

public static java.lang.String expandGuidString(java.lang.String s)
Expands the compact version of the GUID String to a more readable version.
Parameters:
s - a valid compacted GUID string
Returns:
the expanded GUID string

main

public static void main(java.lang.String[] argv)
main function used for testing

Skip navigation links

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

E10664-01


Copyright © 1999, 2009 Oracle. All Rights Reserved.