orc.runtime.values
Interface Eq

All Known Implementing Classes:
ConsValue, Field, ListValue, NilValue, TaggedValue, TupleValue

public interface Eq

Marks value types which can be compared for equivalence in a way that guarantees that equivalent values can be substituted for each other without changing the meaning of a program.

When you implement this, don't forget to override equals and hashCode as well. You should guarantee that if an object is "eqTo" another object it also "equals" that object and has the same hashCode.

Author:
quark

Method Summary
 boolean eqTo(java.lang.Object that)
          Return true if this is equivalent to that.
 

Method Detail

eqTo

boolean eqTo(java.lang.Object that)
Return true if this is equivalent to that. that is assumed to be non-null. This is often implemented in terms of Equal.eq(Object, Object). Two "eq" objects should have the same hashCode at the time they are compared.