@InterfaceAudience.Public public class NullComparator extends ByteArrayComparable
Bytes.compareTo(byte[], byte[])
.value
Constructor and Description |
---|
NullComparator() |
Modifier and Type | Method and Description |
---|---|
(package private) boolean |
areSerializedFieldsEqual(ByteArrayComparable other) |
int |
compareTo(byte[] value) |
int |
compareTo(byte[] value,
int offset,
int length)
Special compareTo method for subclasses, to avoid
copying byte[] unnecessarily.
|
int |
compareTo(ByteBuffer value,
int offset,
int length)
Special compareTo method for subclasses, to avoid copying bytes unnecessarily.
|
boolean |
equals(Object obj) |
int |
hashCode() |
static NullComparator |
parseFrom(byte[] pbBytes) |
byte[] |
toByteArray() |
getValue
public NullComparator()
public int compareTo(byte[] value)
compareTo
in interface Comparable<byte[]>
compareTo
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 int compareTo(ByteBuffer value, int offset, int length)
ByteArrayComparable
compareTo
in class ByteArrayComparable
value
- bytes to compare within a ByteBufferoffset
- offset into valuelength
- number of bytes to comparepublic byte[] toByteArray()
toByteArray
in class ByteArrayComparable
public static NullComparator parseFrom(byte[] pbBytes) throws DeserializationException
pbBytes
- A pb serialized NullComparator
instanceNullComparator
made from bytes
DeserializationException
toByteArray()
boolean areSerializedFieldsEqual(ByteArrayComparable other)
areSerializedFieldsEqual
in class ByteArrayComparable
other
- Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.