|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttip.util.EqualityElement<T>
T
- the element typepublic class EqualityElement<T>
EqualityElement
encapsulates elements of type T
with an
Equalitor
of the same type. The class is used with EqualitySet
and EqualityMap
.
Constructor Summary | |
---|---|
EqualityElement(T element,
Equalitor<T> equalitor)
Creates a new EqualityElement encapsulating element with
the Equalitor equalitor . |
Method Summary | |
---|---|
boolean |
equals(EqualityElement<T> element)
Returns {link Equalitor.equals(Object, Object) from the equalitor
on the encapsulated element and element . |
boolean |
equals(Object o)
Returns false if o is not an EqualityElement ,
otherwise equals(EqualityElement) . |
T |
getElement()
Returns the encapsulated element. |
Equalitor<T> |
getEqualitor()
Returns the equalitor for the element. |
int |
hashCode()
Returns the hashcode from equalitor on the encapsulated element. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EqualityElement(T element, Equalitor<T> equalitor)
EqualityElement
encapsulating element
with
the Equalitor
equalitor
.
element
- the encapsulated elementequalitor
- the equalitor for the elementMethod Detail |
---|
public T getElement()
public Equalitor<T> getEqualitor()
public boolean equals(Object o)
false
if o
is not an EqualityElement
,
otherwise equals(EqualityElement)
.
equals
in class Object
true
if o
an equal EqualityElement
public boolean equals(EqualityElement<T> element)
Equalitor.equals(Object, Object)
from the equalitor
on the encapsulated element and element
.
element
- the compared element
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |