org.glassfish.jersey.internal.util
Class LazyUid
java.lang.Object
org.glassfish.jersey.internal.util.LazyUid
- All Implemented Interfaces:
- java.io.Serializable
public class LazyUid
- extends java.lang.Object
- implements java.io.Serializable
Lazily initialized, thread-safe, random UUID. Useful for identifying instances
for logging & debugging purposes.
The UUID value gets initialized with the first call to value() method.
Once initialized, the UUID value stays the same.
- Author:
- Marek Potociar (marek.potociar at oracle.com)
- See Also:
- Serialized Form
|
Method Summary |
boolean |
equals(java.lang.Object that)
|
int |
hashCode()
|
java.lang.String |
toString()
|
java.lang.String |
value()
Return UUID value. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
LazyUid
public LazyUid()
value
public java.lang.String value()
- Return UUID value. The returned value is never
null.
- Returns:
- UUID value.
equals
public boolean equals(java.lang.Object that)
- Overrides:
equals in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.