|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.io.BinaryComparable
public abstract class BinaryComparable
Interface supported by WritableComparable
types supporting ordering/permutation by a representative set of bytes.
| Constructor Summary | |
|---|---|
BinaryComparable()
|
|
| Method Summary | |
|---|---|
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()}. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BinaryComparable()
| Method Detail |
|---|
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 boolean equals(Object other)
equals in class Objectpublic int hashCode()
hashCode in class ObjectWritableComparator.hashBytes(byte[],int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||