public abstract class BaseDoubleEncodedValue extends java.lang.Object implements DoubleEncodedValue
| Constructor and Description |
|---|
BaseDoubleEncodedValue() |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(EncodedValue o)
Compare this DoubleEncodedValue to another EncodedValue.
|
boolean |
equals(java.lang.Object o)
Compares this DoubleEncodedValue to another DoubleEncodedValue for equality.
|
int |
getValueType()
Returns the type of this encoded value.
|
int |
hashCode()
Returns a hashcode for this EncodedDoubleValue.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetValuepublic int hashCode()
DoubleEncodedValue
long v = Double.doubleToRawLongBits(getValue());
int hashCode = (int)(v^(v>>>32));
Note: This is slightly different than the definition of Double.hashCode(). This uses doubleToRawLongBits()
instead of doubleToLongBits(), in order to preserve as much information as possible.hashCode in interface DoubleEncodedValuehashCode in class java.lang.Objectpublic boolean equals(@Nullable
java.lang.Object o)
DoubleEncodedValueequals in interface DoubleEncodedValueequals in class java.lang.Objecto - The object to be compared for equality with this DoubleEncodedValuepublic int compareTo(@Nonnull
EncodedValue o)
DoubleEncodedValuecompareTo in interface java.lang.Comparable<EncodedValue>compareTo in interface DoubleEncodedValueo - The EncodedValue to compare with this DoubleEncodedValuepublic int getValueType()
EncodedValuegetValueType in interface EncodedValue