facets.util
Class NumberPolicy.ValueVariable
java.lang.Object
facets.util.Tracer
facets.util.NumberPolicy
facets.util.NumberPolicy.Ticked
facets.util.NumberPolicy.ValueVariable
- Enclosing class:
- NumberPolicy
public abstract static class NumberPolicy.ValueVariable
- extends NumberPolicy.Ticked
NumberPolicy.Ticked that adjusts to changes in the value managed.
NumberPolicy.ValueVariable
| Fields inherited from class facets.util.NumberPolicy |
COLUMNS_DEFAULT, debug, FORMAT_DECIMALS_0, FORMAT_DECIMALS_1, FORMAT_DECIMALS_2, FORMAT_DECIMALS_3, FORMAT_DECIMALS_4, FORMAT_HEX, MAX_VALUE, MIN_VALUE, UNIT_JUMP_DEFAULT |
|
Method Summary |
protected abstract double |
currentValue()
|
int |
format()
Hint on formatting the number. |
double |
max()
The highest possible value under the policy. |
double |
min()
The lowest possible value under the policy. |
java.lang.String |
toString()
|
double |
unit()
The smallest possible increment under the policy. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
NumberPolicy.ValueVariable
public NumberPolicy.ValueVariable(double min,
double max)
min
public double min()
- Description copied from class:
NumberPolicy
- The lowest possible value under the policy.
Set immutably during construction but only accessed via
this method, enabling subclasses to define it dynamically by overriding.
- Overrides:
min in class NumberPolicy
max
public double max()
- Description copied from class:
NumberPolicy
- The highest possible value under the policy.
Set immutably during construction but only accessed via
this method, enabling subclasses to define it dynamically by overriding.
- Overrides:
max in class NumberPolicy
format
public int format()
- Description copied from class:
NumberPolicy
- Hint on formatting the number.
These are defined by the class FORMAT_x constants, which are mutually exclusive.
For FORMAT_PLACES_x constants
the format should normally be consistent with unit.
- Overrides:
format in class NumberPolicy
unit
public final double unit()
- Description copied from class:
NumberPolicy
- The smallest possible increment under the policy.
The default implementation deduces this value from NumberPolicy.format().
- Overrides:
unit in class NumberPolicy
currentValue
protected abstract double currentValue()
toString
public java.lang.String toString()
- Overrides:
toString in class NumberPolicy.Ticked