com.twistedmatrix.util
Class HashWrapper

java.lang.Object
  |
  +--com.twistedmatrix.util.HashWrapper

public class HashWrapper
extends java.lang.Object

Wrapper class for storing arbitary objects in HashMaps. Recursive objects such as ArrayList can't be used as keys in a HashMap, so we need to wrap them up.


Field Summary
protected  java.lang.Object content
           
 
Constructor Summary
HashWrapper(java.lang.Object o)
          Create a new wrapper.
 
Method Summary
 boolean equals(java.lang.Object other)
          Compare using ==.
 java.lang.Object getObject()
          Get the stored object.
 int hashCode()
          Compute hash code using java.lanf.Object's algorithm.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

content

protected java.lang.Object content
Constructor Detail

HashWrapper

public HashWrapper(java.lang.Object o)
Create a new wrapper.
Method Detail

getObject

public java.lang.Object getObject()
Get the stored object.

hashCode

public int hashCode()
Compute hash code using java.lanf.Object's algorithm.
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object other)
Compare using ==.
Overrides:
equals in class java.lang.Object