RECODER 0.92

recoder.util
Interface Equality

All Known Subinterfaces:
HashCode, Order
All Known Implementing Classes:
NamedModelElement.LexicalOrder, Order.CustomLexicalOrder, Order.Identity, Order.Lexical, Order.Natural, ProgramElement.TreeStructure, ProgramModelElement.LexicalOrder, Relations.ModelElementLexicalOrder

public interface Equality

This interface defines an equality relation between two objects. Equality relations are

Whether or not objects of different type or null objects are allowed is up to the specific implementation.

Author:
AL

Field Summary
static Equality IDENTITY
          Identity equality relation object.
static Equality NATURAL
          Natural equality relation object.
 
Method Summary
 boolean equals(java.lang.Object x, java.lang.Object y)
          Compares two objects for equality.
 

Field Detail

NATURAL

static final Equality NATURAL
Natural equality relation object. The implementation calls x.equals(y), hence no null are allowed (not even for y, as the relation must be symmetric).


IDENTITY

static final Equality IDENTITY
Identity equality relation object. The implementation compares x and y for object identity (x == y). Two null objects are considered equal.

Method Detail

equals

boolean equals(java.lang.Object x,
               java.lang.Object y)
Compares two objects for equality.

Parameters:
x - the first object.
y - the second object.
Returns:
true, if x equals y, false otherwise.

RECODER 0.92