public abstract class BinaryComparable extends Object implements Comparable<BinaryComparable>
WritableComparable
types supporting ordering/permutation by a representative set of bytes.构造器和说明 |
---|
BinaryComparable() |
限定符和类型 | 方法和说明 |
---|---|
int |
compareTo(BinaryComparable other)
Compare bytes from {#getBytes()}.
|
int |
compareTo(byte[] other,
int off,
int len)
Compare bytes from {#getBytes()} to those provided.
|
boolean |
equals(Object other)
Return true if bytes from {#getBytes()} match.
|
abstract byte[] |
getBytes()
Return representative byte array for this instance.
|
abstract int |
getLength()
Return n st bytes 0..n-1 from {#getBytes()} are valid.
|
int |
hashCode()
Return a hash of the bytes returned from {#getBytes()}.
|
public abstract int getLength()
public abstract byte[] getBytes()
public int compareTo(BinaryComparable other)
public int compareTo(byte[] other, int off, int len)
public boolean equals(Object other)
public int hashCode()
hashCode
在类中 Object
WritableComparator.hashBytes(byte[],int)
Copyright © 2009 The Apache Software Foundation