org.sourceforge.jemm.collections.internal
Class StoredValue

java.lang.Object
  extended by org.sourceforge.jemm.collections.internal.StoredValue
All Implemented Interfaces:
java.io.Serializable, Encodable<StoredValue>, Visitable

public class StoredValue
extends java.lang.Object
implements java.io.Serializable, Encodable<StoredValue>, Visitable

A encodable value that carries its hashcode outside itself.

Author:
Rory Graves
See Also:
Serialized Form

Constructor Summary
StoredValue(int hashCode, java.lang.Object value)
           
StoredValue(java.lang.Object value)
           
 
Method Summary
 StoredValue encode(ValueEncoder encoder)
           
 boolean equals(java.lang.Object obj)
           
 int getHashCode()
           
 java.lang.Object getValue()
           
 int hashCode()
           
 boolean isPotentialMatch(StoredValue otherValue)
           
 java.lang.String toString()
           
 void visit(ValueVisitor visitor)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StoredValue

public StoredValue(java.lang.Object value)

StoredValue

public StoredValue(int hashCode,
                   java.lang.Object value)
Method Detail

encode

public StoredValue encode(ValueEncoder encoder)
Specified by:
encode in interface Encodable<StoredValue>

getHashCode

public int getHashCode()

getValue

public java.lang.Object getValue()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

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

visit

public void visit(ValueVisitor visitor)
Specified by:
visit in interface Visitable

isPotentialMatch

public boolean isPotentialMatch(StoredValue otherValue)


Copyright © 2009. All Rights Reserved.