net.ctdp.rfdynhud.values
Class FloatValue
java.lang.Object
net.ctdp.rfdynhud.values.FloatValue
public class FloatValue
- extends java.lang.Object
This class is a container for runtime values.
You can update the value every time, a Widget is redrawn
and compare it with the old (previous) value.
- Author:
- Marvin Froehlich (CTDP)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DEFAULT_RESET_VALUE
public static final float DEFAULT_RESET_VALUE
- See Also:
- Constant Field Values
DEFAULT_COMPARE_PRECISION
public static final float DEFAULT_COMPARE_PRECISION
- See Also:
- Constant Field Values
N_A_VALUE
public static final java.lang.String N_A_VALUE
- See Also:
- Constant Field Values
FloatValue
public FloatValue(float resetValue,
float comparePrecision,
ValidityTest validityTest,
float validityCompareValue)
FloatValue
public FloatValue(float resetValue,
float comparePrecision)
FloatValue
public FloatValue(float resetValue,
ValidityTest validityTest,
float validityCompareValue)
FloatValue
public FloatValue(float resetValue)
FloatValue
public FloatValue(ValidityTest validityTest,
float validityCompareValue)
FloatValue
public FloatValue()
getResetValue
public final float getResetValue()
getComparePrecision
public final float getComparePrecision()
getValdidityTest
public final ValidityTest getValdidityTest()
getValidityCompareValue
public final float getValidityCompareValue()
getOldValue
public final float getOldValue()
getValue
public final float getValue()
getIntValue
public final int getIntValue(boolean round)
getIntValue
public final int getIntValue()
hasChanged
public final boolean hasChanged(boolean setUnchanged)
hasChanged
public final boolean hasChanged()
update
public final boolean update(float newValue)
setUnchanged
public final void setUnchanged()
reset
public final FloatValue reset(boolean resetOldValue)
reset
public final FloatValue reset()
isValid
public final boolean isValid()
hasValidityChanged
public final boolean hasValidityChanged()
getValueAsStringWithSign
public final java.lang.String getValueAsStringWithSign()
getValueAsStringWithSign
public final java.lang.String getValueAsStringWithSign(boolean round)
getValueAsStringWithSign
public final java.lang.String getValueAsStringWithSign(float factor,
boolean round)
getValueAsStringWithSign
public final java.lang.String getValueAsStringWithSign(int precision)
getValueAsString
public final java.lang.String getValueAsString()
getValueAsString
public final java.lang.String getValueAsString(boolean round)
getValueAsString
public final java.lang.String getValueAsString(float factor,
boolean round)
getValueAsString
public final java.lang.String getValueAsString(int precision)
toString
public java.lang.String toString()
-
- Overrides:
toString
in class java.lang.Object