public interface Order<A>
extends java.util.Comparator<A>
Modifier and Type | Method and Description |
---|---|
long |
cardinal(A key)
returns a cardinal number in the range of 0 ..
|
Order<A> |
clone() |
int |
compare(A a,
A b) |
void |
direction(boolean ascending)
the ordering direction can be changed at any time
|
boolean |
equal(A a,
A b) |
boolean |
equals(java.lang.Object o)
used to compare different order objects; they may define the same ordering
|
int |
hashCode() |
long |
partition(A key,
int forkes) |
void |
rotate(A zero)
defines that the ordering rotates, and sets the zero point for the rotation
|
java.lang.String |
signature()
returns a signature String so that different orderings have different signatures
|
boolean |
wellformed(A a)
returns true if and only if a has only characters that belong to the implemented order
|
A |
zero()
returns the zero point of the Ordering; null if not defined
|
boolean wellformed(A a)
a
- void direction(boolean ascending)
ascending
- java.lang.String signature()
long partition(A key, int forkes)
long cardinal(A key)
key
- A zero()
void rotate(A zero)
zero
- boolean equals(java.lang.Object o)
equals
in interface java.util.Comparator<A>
equals
in class java.lang.Object
int hashCode()
hashCode
in class java.lang.Object