public interface FloatEncodedValue extends EncodedValue
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(EncodedValue o)
Compare this FloatEncodedValue to another EncodedValue.
|
boolean |
equals(java.lang.Object o)
Compares this FloatEncodedValue to another FloatEncodedValue for equality.
|
float |
getValue()
Gets the float value.
|
int |
hashCode()
Returns a hashcode for this EncodedFloatValue.
|
getValueTypefloat getValue()
int hashCode()
int hashCode = Float.floatToRawIntBits(getValue());
Note: This is slightly different than the definition of Float.hashCode(). This uses floatToRawIntBits()
instead of floatToIntBits(), 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 FloatEncodedValueint compareTo(@Nonnull
EncodedValue o)
compareTo in interface java.lang.Comparable<EncodedValue>o - The EncodedValue to compare with this FloatEncodedValue