@InterfaceAudience.Public @InterfaceStability.Stable 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"));
| Constructor and Description |
|---|
SubstringComparator(String substr)
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.
|
byte[] |
getValue() |
static SubstringComparator |
parseFrom(byte[] pbBytes) |
byte[] |
toByteArray() |
compareTopublic SubstringComparator(String substr)
substr - the substringpublic byte[] getValue()
getValue in class ByteArrayComparablepublic int compareTo(byte[] value,
int offset,
int length)
ByteArrayComparablecompareTo in class ByteArrayComparablevalue - byte[] to compareoffset - offset into valuelength - number of bytes to comparepublic byte[] toByteArray()
toByteArray in class ByteArrayComparablepublic static SubstringComparator parseFrom(byte[] pbBytes) throws DeserializationException
pbBytes - A pb serialized SubstringComparator instanceSubstringComparator made from bytesDeserializationExceptiontoByteArray()Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.