java.lang.Comparable<BinaryComparable>BytesWritable, Text@Public @Stable public abstract class BinaryComparable extends java.lang.Object implements java.lang.Comparable<BinaryComparable>
WritableComparable
types supporting ordering/permutation by a representative set of bytes.| Constructor | Description |
|---|---|
BinaryComparable() |
| Modifier and Type | Method | Description |
|---|---|---|
int |
compareTo(byte[] other,
int off,
int len) |
Compare bytes from {#getBytes()} to those provided.
|
int |
compareTo(BinaryComparable other) |
Compare bytes from {#getBytes()}.
|
boolean |
equals(java.lang.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)
compareTo in interface java.lang.Comparable<BinaryComparable>WritableComparator.compareBytes(byte[],int,int,byte[],int,int)public int compareTo(byte[] other,
int off,
int len)
other - other.off - off.len - len.public boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.ObjectWritableComparator.hashBytes(byte[],int)Copyright © 2008–2025 Apache Software Foundation. All rights reserved.