|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.robokind.api.common.position.NumberRange
public class NumberRange
Specifies a simple NormalizableRange of Numbers defined by a min and max. The min is specifies the number corresponding to 0.0 when normalized. The min is not always less than the max (using compareTo()). If the min is larger than the max, it results is reversing the direction of the range.
Constructor Summary | |
---|---|
NumberRange(int min,
int max)
|
Method Summary | |
---|---|
Integer |
denormalizeValue(NormalizedDouble v)
Denormalizes a NormalizedDouble to a value within this NormalizableRange. |
boolean |
isValid(Integer val)
Returns true if t is within the NormalizableRange. |
NormalizedDouble |
normalizeValue(Integer val)
Normalizes a value within the NormalizableRange. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NumberRange(int min, int max)
Method Detail |
---|
public boolean isValid(Integer val)
NormalizableRange
isValid
in interface NormalizableRange<Integer>
val
- value to check
public NormalizedDouble normalizeValue(Integer val)
NormalizableRange
normalizeValue
in interface NormalizableRange<Integer>
val
- value to normalize
public Integer denormalizeValue(NormalizedDouble v)
NormalizableRange
denormalizeValue
in interface NormalizableRange<Integer>
v
- value to denormalize
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |