@InterfaceAudience.Public @InterfaceStability.Stable public abstract class BinaryComparable extends Object implements Comparable<BinaryComparable>
WritableComparable
types supporting ordering/permutation by a representative set of bytes.Constructor and Description |
---|
BinaryComparable() |
Modifier and Type | Method and Description |
---|---|
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 BinaryComparable()
public abstract int getLength()
public abstract byte[] getBytes()
public int compareTo(BinaryComparable other)
compareTo
in interface Comparable<BinaryComparable>
WritableComparator.compareBytes(byte[],int,int,byte[],int,int)
public int compareTo(byte[] other, int off, int len)
public int hashCode()
hashCode
in class Object
WritableComparator.hashBytes(byte[],int)
Copyright © 2018 Apache Software Foundation. All rights reserved.