eu.esdihumboldt.util
Class IdentityWrapper<T>
java.lang.Object
eu.esdihumboldt.util.IdentityWrapper<T>
- Type Parameters:
T
- the value type
@Immutable
public class IdentityWrapper<T>
- extends Object
Class that defines its equals(Object)
and hashCode()
based
on the contained values identity.
- Author:
- Simon Templer
Constructor Summary |
IdentityWrapper(T value)
Create a wrapper for the given value. |
IdentityWrapper
public IdentityWrapper(T value)
- Create a wrapper for the given value.
- Parameters:
value
- the value to wrap, if the value is an
IdentityWrapper
, its value will be extracted and used
as the value to wrap
getValue
public T getValue()
- Get the contained value.
- Returns:
- the value
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d