Package org.eclipse.jface.viewers
Interface IElementComparer
-
public interface IElementComparer
This interface is used to compare elements in a viewer for equality, and to provide the hash code for an element. This allows the client of the viewer to specify different equality criteria and a different hash code implementation than theequals
andhashCode
implementations of the elements themselves.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
equals(Object a, Object b)
Compares two elements for equalityint
hashCode(Object element)
Returns the hash code for the given element.
-
-
-
Method Detail
-
equals
boolean equals(Object a, Object b)
Compares two elements for equality- Parameters:
a
- the first elementb
- the second element- Returns:
- whether a is equal to b
-
hashCode
int hashCode(Object element)
Returns the hash code for the given element.- Parameters:
element
- the element the hash code is calculated for- Returns:
- the hash code for the given element
-
-