@InterfaceAudience.Public public class SubstringComparator extends ByteArrayComparable
Only EQUAL or NOT_EQUAL tests are valid with this comparator.
For example:
SingleColumnValueFilter scvf = new SingleColumnValueFilter("col", CompareOp.EQUAL, new SubstringComparator("substr"));
Modifier and Type | Field and Description |
---|---|
private String |
substr |
value
Constructor and Description |
---|
SubstringComparator(String substr)
Constructor
|
Modifier and Type | Method and Description |
---|---|
(package private) boolean |
areSerializedFieldsEqual(ByteArrayComparable other) |
int |
compareTo(byte[] value,
int offset,
int length)
Special compareTo method for subclasses, to avoid
copying byte[] unnecessarily.
|
byte[] |
getValue() |
static SubstringComparator |
parseFrom(byte[] pbBytes) |
byte[] |
toByteArray() |
compareTo, compareTo
public SubstringComparator(String substr)
substr
- the substringpublic byte[] getValue()
getValue
in class ByteArrayComparable
public int compareTo(byte[] value, int offset, int length)
ByteArrayComparable
compareTo
in class ByteArrayComparable
value
- byte[] to compareoffset
- offset into valuelength
- number of bytes to comparepublic byte[] toByteArray()
toByteArray
in class ByteArrayComparable
public static SubstringComparator parseFrom(byte[] pbBytes) throws DeserializationException
pbBytes
- A pb serialized SubstringComparator
instanceSubstringComparator
made from bytes
DeserializationException
toByteArray()
boolean areSerializedFieldsEqual(ByteArrayComparable other)
areSerializedFieldsEqual
in class ByteArrayComparable
other
- Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.