SourceForge.net Logo

de.mindmatters.faces.util
Class RandomGuid

java.lang.Object
  extended byde.mindmatters.faces.util.RandomGuid
All Implemented Interfaces:
java.io.Serializable

public final class RandomGuid
extends java.lang.Object
implements java.io.Serializable

Globally unique identifier generator.

Note: This class is based on the code of org.springframework.webflow.util.RandomGuid.

Author:
Marc A. Mnich, Andreas Kuhrwahl
See Also:
Serialized Form

Field Summary
protected static org.apache.commons.logging.Log LOGGER
          For logging.
 
Constructor Summary
RandomGuid()
          Default constructor.
RandomGuid(boolean secure)
          Constructor with security option.
 
Method Summary
 boolean equals(java.lang.Object obj)
          
 int hashCode()
          
 java.lang.String toString()
          Convert to the standard format for GUID (Useful for SQL Server UniqueIdentifiers, etc).
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

LOGGER

protected static final org.apache.commons.logging.Log LOGGER
For logging.

Constructor Detail

RandomGuid

public RandomGuid()
Default constructor. With no specification of security option, this constructor defaults to lower security, high performance.


RandomGuid

public RandomGuid(boolean secure)
Constructor with security option. Setting secure true enables each random number generated to be cryptographically strong. Secure false defaults to the standard Random function seeded with a single cryptographically strong random number.

Parameters:
secure - with security option or not?
Method Detail

toString

public java.lang.String toString()
Convert to the standard format for GUID (Useful for SQL Server UniqueIdentifiers, etc). Example: C2FEEEAC-CFCD-11D1-8B05-00600806D9B6

Returns:
a string representation

equals

public boolean equals(java.lang.Object obj)


hashCode

public int hashCode()


SourceForge.net Logo

Copyright © 2002 mindmatters GmbH & Co. KG