org.sonatype.sisu.goodies.common
Class OID
java.lang.Object
org.sonatype.sisu.goodies.common.OID
public class OID
- extends Object
Provides a general identifier for objects.
String representation should follow the default behavior of Object.toString()
.
hashCode()
/equals(java.lang.Object)
behavior differs to make the OID unique based on
type
and hash
. When constructing from an object the hash is always
the System.identityHashCode(java.lang.Object)
.
- Since:
- 1.0
NULL
public static final OID NULL
getType
public String getType()
getHash
public int getHash()
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
get
public static OID get(Object obj)
oid
public static OID oid(Object obj)
- Since:
- 1.1
- See Also:
get(java.lang.Object)
parse
public static OID parse(String spec)
render
public static String render(Object obj)
find
public static <T> T find(Collection<T> items,
String id)
find
public static <T> T find(Collection<T> items,
OID id)
Copyright © 2008-2012 Sonatype, Inc.. All Rights Reserved.