org.apache.hadoop.hbase.filter
Class WritableByteArrayComparable
java.lang.Object
org.apache.hadoop.hbase.filter.WritableByteArrayComparable
- All Implemented Interfaces:
- Comparable<byte[]>, org.apache.hadoop.io.Writable
- Direct Known Subclasses:
- BinaryComparator, BinaryPrefixComparator, BitComparator, NullComparator, RegexStringComparator, SubstringComparator
public abstract class WritableByteArrayComparable
- extends Object
- implements org.apache.hadoop.io.Writable, Comparable<byte[]>
Base class, combines Comparable and Writable.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WritableByteArrayComparable
public WritableByteArrayComparable()
- Nullary constructor, for Writable
WritableByteArrayComparable
public WritableByteArrayComparable(byte[] value)
- Constructor.
- Parameters:
value
- the value to compare against
getValue
public byte[] getValue()
readFields
public void readFields(DataInput in)
throws IOException
- Specified by:
readFields
in interface org.apache.hadoop.io.Writable
- Throws:
IOException
write
public void write(DataOutput out)
throws IOException
- Specified by:
write
in interface org.apache.hadoop.io.Writable
- Throws:
IOException
compareTo
public int compareTo(byte[] value)
- Specified by:
compareTo
in interface Comparable<byte[]>
compareTo
public abstract int compareTo(byte[] value,
int offset,
int length)
- Special compareTo method for subclasses, to avoid
copying byte[] unnecessarily.
- 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 © 2014 The Apache Software Foundation. All Rights Reserved.