@InterfaceAudience.Public public class BigDecimalComparator extends ByteArrayComparable
Modifier and Type | Field and Description |
---|---|
private BigDecimal |
bigDecimal |
value
Constructor and Description |
---|
BigDecimalComparator(BigDecimal value) |
Modifier and Type | Method and Description |
---|---|
(package private) boolean |
areSerializedFieldsEqual(BigDecimalComparator other) |
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 BigDecimalComparator |
parseFrom(byte[] pbBytes) |
byte[] |
toByteArray() |
areSerializedFieldsEqual, compareTo, getValue
private BigDecimal bigDecimal
public BigDecimalComparator(BigDecimal value)
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 BigDecimalComparator parseFrom(byte[] pbBytes) throws DeserializationException
pbBytes
- A pb serialized BigDecimalComparator
instanceBigDecimalComparator
made from bytes
DeserializationException
- A deserialization exceptiontoByteArray()
boolean areSerializedFieldsEqual(BigDecimalComparator other)
other
- the other comparatorCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.