public class BitComparator extends WritableByteArrayComparable
Modifier and Type | Class and Description |
---|---|
static class |
BitComparator.BitwiseOp
Bit operators.
|
Modifier and Type | Field and Description |
---|---|
protected BitComparator.BitwiseOp |
bitOperator |
Constructor and Description |
---|
BitComparator()
Nullary constructor for Writable, do not use
|
BitComparator(byte[] value,
BitComparator.BitwiseOp bitOperator)
Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(byte[] value,
int offset,
int length)
Special compareTo method for subclasses, to avoid
copying byte[] unnecessarily.
|
BitComparator.BitwiseOp |
getOperator() |
void |
readFields(DataInput in) |
void |
write(DataOutput out) |
compareTo, getValue
protected BitComparator.BitwiseOp bitOperator
public BitComparator()
public BitComparator(byte[] value, BitComparator.BitwiseOp bitOperator)
value
- valuebitOperator
- operator to use on the bit comparisonpublic BitComparator.BitwiseOp getOperator()
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
readFields
in class WritableByteArrayComparable
IOException
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
write
in class WritableByteArrayComparable
IOException
public int compareTo(byte[] value, int offset, int length)
WritableByteArrayComparable
compareTo
in class WritableByteArrayComparable
value
- byte[] to compareoffset
- offset into valuelength
- number of bytes to compareCopyright © 2014 The Apache Software Foundation. All Rights Reserved.