org.apache.hadoop.hbase.filter
Class BitComparator
java.lang.Object
org.apache.hadoop.hbase.filter.WritableByteArrayComparable
org.apache.hadoop.hbase.filter.BitComparator
- All Implemented Interfaces:
- Comparable<byte[]>, org.apache.hadoop.io.Writable
public class BitComparator
- extends WritableByteArrayComparable
A bit comparator which performs the specified bitwise operation on each of the bytes
with the specified byte array. Then returns whether the result is non-zero.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
bitOperator
protected BitComparator.BitwiseOp bitOperator
BitComparator
public BitComparator()
- Nullary constructor for Writable, do not use
BitComparator
public BitComparator(byte[] value,
BitComparator.BitwiseOp bitOperator)
- Constructor
- Parameters:
value
- valuebitOperator
- operator to use on the bit comparison
getOperator
public BitComparator.BitwiseOp getOperator()
- Returns:
- the bitwise operator
readFields
public void readFields(DataInput in)
throws IOException
- Specified by:
readFields
in interface org.apache.hadoop.io.Writable
- Overrides:
readFields
in class WritableByteArrayComparable
- Throws:
IOException
write
public void write(DataOutput out)
throws IOException
- Specified by:
write
in interface org.apache.hadoop.io.Writable
- Overrides:
write
in class WritableByteArrayComparable
- Throws:
IOException
compareTo
public int compareTo(byte[] value,
int offset,
int length)
- Description copied from class:
WritableByteArrayComparable
- Special compareTo method for subclasses, to avoid
copying byte[] unnecessarily.
- Specified by:
compareTo
in class WritableByteArrayComparable
- Parameters:
value
- byte[] to compareoffset
- offset into valuelength
- number of bytes to compare
- Returns:
- a negative integer, zero, or a positive integer as this object
is less than, equal to, or greater than the specified object.
Copyright © 2012 The Apache Software Foundation. All Rights Reserved.