|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jdsl.core.ref.AbstractComparator | +--jdsl.core.ref.ByteArrayComparator | +--jdsl.core.ref.LexicographicalByteArrayComparator
A Lexicographical comparator for byte arrays.
Constructor Summary | |
LexicographicalByteArrayComparator()
|
Method Summary | |
int |
compare(byte[] a,
byte[] b)
This is the definition of lexicographic ordering. |
Methods inherited from class jdsl.core.ref.ByteArrayComparator |
compare, isComparable |
Methods inherited from class jdsl.core.ref.AbstractComparator |
isEqualTo, isGreaterThan, isGreaterThanOrEqualTo, isLessThan, isLessThanOrEqualTo |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface jdsl.core.api.Comparator |
isGreaterThan, isGreaterThanOrEqualTo, isLessThan, isLessThanOrEqualTo |
Methods inherited from interface jdsl.core.api.EqualityComparator |
isEqualTo |
Constructor Detail |
public LexicographicalByteArrayComparator()
Method Detail |
public int compare(byte[] a, byte[] b)
a[k]-b[k]
If there is no index position at which they differ, then the shorter byte array lexicographically
precedes the longer byte array. In this case, compareTo returns the difference of the lengths of the
byte arrays -- that is, the value:
this.length-anotherByteArray.length
compare
in class ByteArrayComparator
0
if the argument byte array is equal to this byte array;
a value less than 0
if this byte array is
lexicographically less than the byte array argument; and a value greater than
0
if this byte array is
lexicographically greater than the byte array argument.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |