net.sf.mmm.util.collection.base
Class HashKey<T>
java.lang.Object
net.sf.mmm.util.collection.base.HashKey<T>
- Type Parameters:
T - is the templated type of the delegate-object.
public class HashKey<T>
- extends Object
This is a simple class that allows to use any object
as hash-key. It only
matches the exact same instance regardless of the
Object.equals(Object) method of the delegate-object. Additionally it sill matches even if the
delegate-object has been modified and therefore
changed its hash-code.
- Since:
- 1.0.1
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
|
Constructor Summary |
HashKey(T object)
The constructor. |
delegate
private T delegate
- See Also:
getDelegate()
HashKey
public HashKey(T object)
- The constructor.
- Parameters:
object - is the delegate object.
getDelegate
public T getDelegate()
- This method gets the original object this hash-key delegates to.
- Returns:
- the data object.
hashCode
public int hashCode()
-
- Overrides:
hashCode in class Object
equals
public boolean equals(Object other)
-
- Overrides:
equals in class Object
toString
public String toString()
-
- Overrides:
toString in class Object
Copyright © 2001-2010 mmm-Team. All Rights Reserved.