public interface DoubleEncodedValue extends EncodedValue
| 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.
|
double |
getValue()
Gets the double value.
|
int |
hashCode()
Returns a hashcode for this EncodedDoubleValue.
|
getValueTypedouble getValue()
int hashCode()
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 class java.lang.Objectboolean equals(@Nullable
java.lang.Object o)
equals in class java.lang.Objecto - The object to be compared for equality with this DoubleEncodedValueint compareTo(@Nonnull
EncodedValue o)
compareTo in interface java.lang.Comparable<EncodedValue>o - The EncodedValue to compare with this DoubleEncodedValue