NextApp Echo
App Container 1.0.5

nextapp.echoservlet
Class Id

java.lang.Object
  extended bynextapp.echoservlet.Id
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable

public final class Id
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable

A unique identifier. Each subsequent construction of an identifier will have a value greater than the previous.

See Also:
Serialized Form

Field Summary
private static java.lang.String middle
           
private static java.security.SecureRandom seeder
           
private  java.lang.String value
          Holds the identifier value
 
Constructor Summary
Id()
          Creates a new identifier.
Id(java.lang.String value)
          Creates a new identifier from a string.
 
Method Summary
 int compareTo(java.lang.Object o)
           
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
private static java.lang.String hexValue(byte[] bytes)
          Converts the sepecified byte array into a hexdecimal String.
private static java.lang.String hexValue(int i)
          Converts an integer to an eight-byte hexadecimal String.
 java.lang.String toString()
          Returns the identifier as a string.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

seeder

private static java.security.SecureRandom seeder

middle

private static java.lang.String middle

value

private java.lang.String value
Holds the identifier value

Constructor Detail

Id

public Id()
Creates a new identifier.


Id

public Id(java.lang.String value)
Creates a new identifier from a string.

Parameters:
value - A string representation of the desired identifier.
Method Detail

hexValue

private static java.lang.String hexValue(byte[] bytes)
Converts the sepecified byte array into a hexdecimal String.


hexValue

private static java.lang.String hexValue(int i)
Converts an integer to an eight-byte hexadecimal String.


compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable
See Also:
Comparable.compareTo(Object)

equals

public boolean equals(java.lang.Object o)
See Also:
Object.equals(Object)

hashCode

public int hashCode()
See Also:
Object.hashCode()

toString

public java.lang.String toString()
Returns the identifier as a string. The contents of the string will be a hexadecimal value.

Returns:
A string representation of the identifier.

NextApp Echo
App Container 1.0.5