org.apache.hadoop.hbase.filter
Class BitComparator

java.lang.Object
  extended by org.apache.hadoop.hbase.filter.WritableByteArrayComparable
      extended by 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.


Nested Class Summary
static class BitComparator.BitwiseOp
          Bit operators.
 
Field Summary
protected  BitComparator.BitwiseOp bitOperator
           
 
Constructor Summary
BitComparator()
          Nullary constructor for Writable, do not use
BitComparator(byte[] value, BitComparator.BitwiseOp bitOperator)
          Constructor
 
Method Summary
 int compareTo(byte[] value)
           
 BitComparator.BitwiseOp getOperator()
           
 void readFields(DataInput in)
           
 void write(DataOutput out)
           
 
Methods inherited from class org.apache.hadoop.hbase.filter.WritableByteArrayComparable
getValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bitOperator

protected BitComparator.BitwiseOp bitOperator
Constructor Detail

BitComparator

public BitComparator()
Nullary constructor for Writable, do not use


BitComparator

public BitComparator(byte[] value,
                     BitComparator.BitwiseOp bitOperator)
Constructor

Parameters:
value - value
bitOperator - operator to use on the bit comparison
Method Detail

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)
Specified by:
compareTo in interface Comparable<byte[]>
Overrides:
compareTo in class WritableByteArrayComparable


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.