public final class NaturalOrder extends AbstractOrder<byte[]> implements ByteOrder, java.util.Comparator<byte[]>, java.lang.Cloneable, java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
NaturalOrder.LongIter |
Modifier and Type | Field and Description |
---|---|
static java.util.Comparator<java.lang.String> |
naturalComparator |
static ByteOrder |
naturalOrder |
private static long |
serialVersionUID |
asc, zero
Constructor and Description |
---|
NaturalOrder(boolean ascending) |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
arrayList(byte[] b,
int start,
int length) |
static ByteOrder |
bySignature(java.lang.String signature) |
long |
cardinal(byte[] key)
returns a cardinal number in the range of 0 ..
|
long |
cardinal(byte[] key,
int off,
int len) |
private static long |
cardinalI(byte[] key,
int off,
int len) |
Order<byte[]> |
clone() |
int |
compare(byte[] a,
byte[] b) |
int |
compare(byte[] a,
byte[] b,
int length) |
int |
compare(byte[] a,
int aoffset,
byte[] b,
int boffset,
int length) |
private int |
compare0(byte[] a,
byte[] b,
int length) |
private int |
compare0(byte[] a,
int aoffset,
byte[] b,
int boffset,
int length) |
private static int |
compares(byte[] a,
byte[] b,
int length) |
private static int |
compares(byte[] a,
int aoffset,
byte[] b,
int boffset,
int length) |
static long |
decodeLong(byte[] s) |
static long |
decodeLong(byte[] s,
int offset,
int length) |
static void |
encodeLong(long c,
byte[] b,
int offset,
int length) |
static byte[] |
encodeLong(long c,
int length) |
boolean |
equal(byte[] a,
byte[] b) |
boolean |
equal(byte[] a,
int astart,
byte[] b,
int bstart,
int length) |
static java.util.Iterator<java.lang.Long> |
LongIterator(java.util.Iterator<byte[]> b256Iterator) |
static void |
main(java.lang.String[] args) |
static ByteOrder |
orderBySignature(java.lang.String signature) |
private static int |
sig(int x) |
java.lang.String |
signature()
returns a signature String so that different orderings have different signatures
|
static java.lang.String |
table(byte[] b,
int linewidth) |
boolean |
wellformed(byte[] a)
returns true if and only if a has only characters that belong to the implemented order
|
boolean |
wellformed(byte[] a,
int astart,
int alength) |
direction, equals, hashCode, largest, partition, rotate, smallest, zero
private static final long serialVersionUID
public static final ByteOrder naturalOrder
public static final java.util.Comparator<java.lang.String> naturalComparator
public boolean wellformed(byte[] a)
Order
wellformed
in interface ByteOrder
wellformed
in interface Order<byte[]>
public boolean wellformed(byte[] a, int astart, int alength)
wellformed
in interface ByteOrder
public final Order<byte[]> clone()
clone
in interface Order<byte[]>
clone
in class AbstractOrder<byte[]>
public static ByteOrder orderBySignature(java.lang.String signature)
public static final ByteOrder bySignature(java.lang.String signature)
public final java.lang.String signature()
Order
private static final long cardinalI(byte[] key, int off, int len)
public final long cardinal(byte[] key)
Order
public long cardinal(byte[] key, int off, int len)
public static final byte[] encodeLong(long c, int length)
public static final void encodeLong(long c, byte[] b, int offset, int length)
public static final long decodeLong(byte[] s)
public static final long decodeLong(byte[] s, int offset, int length)
private static final int sig(int x)
public final int compare(byte[] a, byte[] b)
public final int compare(byte[] a, byte[] b, int length)
public final int compare(byte[] a, int aoffset, byte[] b, int boffset, int length)
private final int compare0(byte[] a, byte[] b, int length)
private final int compare0(byte[] a, int aoffset, byte[] b, int boffset, int length)
public final boolean equal(byte[] a, byte[] b)
public final boolean equal(byte[] a, int astart, byte[] b, int bstart, int length)
private static final int compares(byte[] a, byte[] b, int length)
private static final int compares(byte[] a, int aoffset, byte[] b, int boffset, int length)
public static final java.lang.String arrayList(byte[] b, int start, int length)
public static final java.lang.String table(byte[] b, int linewidth)
public static java.util.Iterator<java.lang.Long> LongIterator(java.util.Iterator<byte[]> b256Iterator)
public static void main(java.lang.String[] args)