|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjdsl.core.ref.IntegerHashComparator
An implementation of a HashComparator for java.lang.Integers
| Constructor Summary | |
IntegerHashComparator()
|
|
| Method Summary | |
int |
hashValue(Object toHash)
defines a mapping f: Integer -> \mathbb{Z} \cap [0, 2^{31} -1] |
boolean |
isComparable(Object toCompare)
determines if the Comparator can use this Object |
boolean |
isEqualTo(Object first,
Object second)
tests equality on two Integers |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public IntegerHashComparator()
| Method Detail |
public boolean isComparable(Object toCompare)
isComparable in interface EqualityComparatortoCompare - Any java.lang.Object
public boolean isEqualTo(Object first,
Object second)
throws ClassCastException
isEqualTo in interface EqualityComparatorfirst - First Object to comparesecond - Second Object to compare
ClassCastException
public int hashValue(Object toHash)
throws ClassCastException
hashValue in interface HashComparatortoHash - an object acting as a key in a hash table
ClassCastException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||