org.tockit.datatype
Class AbstractValue

java.lang.Object
  extended byorg.tockit.datatype.AbstractValue
All Implemented Interfaces:
Ordered, Value
Direct Known Subclasses:
DecimalValue, StringValue

public abstract class AbstractValue
extends java.lang.Object
implements Value


Field Summary
 
Fields inherited from interface org.tockit.datatype.Value
NULL
 
Constructor Summary
AbstractValue()
           
 
Method Summary
 boolean equals(java.lang.Object other)
          This implementation just checks the basics (not null, same type) and then delegates to the abstract sameTypeEquals(Object).
abstract  int hashCode()
           
 boolean isEqual(Ordered other)
          Ordered.isEqual() should match equals() since we assume value-identity.
 boolean isLesserThan(Ordered other)
          We default to be a co-chain.
protected abstract  boolean sameTypeEquals(java.lang.Object other)
           
 java.lang.String toString()
          Implements the requirement of Value that toString() matched getDisplayString().
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.tockit.datatype.Value
getDisplayString
 

Constructor Detail

AbstractValue

public AbstractValue()
Method Detail

isLesserThan

public boolean isLesserThan(Ordered other)
We default to be a co-chain.

Specified by:
isLesserThan in interface Ordered
Parameters:
other - the object to compare to, must not be null
Returns:
true iff the current object is considered less than the one passed

isEqual

public boolean isEqual(Ordered other)
Ordered.isEqual() should match equals() since we assume value-identity.

Specified by:
isEqual in interface Ordered
Parameters:
other - the object to compare to, must not be null
Returns:
true iff the current object is considered equal to the one passed

toString

public java.lang.String toString()
Implements the requirement of Value that toString() matched getDisplayString().


equals

public final boolean equals(java.lang.Object other)
This implementation just checks the basics (not null, same type) and then delegates to the abstract sameTypeEquals(Object).


sameTypeEquals

protected abstract boolean sameTypeEquals(java.lang.Object other)

hashCode

public abstract int hashCode()


The ToscanaJ project