public class NormalizedDouble extends Object implements Comparable, Cloneable
| Constructor and Description |
|---|
NormalizedDouble(double value)
Creates a new NormalizedDouble with the given value
|
| Modifier and Type | Method and Description |
|---|---|
Object |
clone() |
int |
compareTo(Object o) |
boolean |
equals(Object obj) |
double |
getValue()
Returns the value of the NormalizeRange.
|
int |
hashCode() |
static boolean |
isValid(double value)
Returns true if the given value can be used to create a NormalizedDouble.
|
protected void |
rangeCheck(double value)
Checks that the value is within the range [0.0, 1.0].
|
String |
toString() |
public NormalizedDouble(double value)
value - the value to setIllegalArgumentException - if value is not in the range [0.0, 1.0]public double getValue()
protected final void rangeCheck(double value)
value - the value to checkIllegalArgumentException - if value is not in the range [0.0,1.0]public static boolean isValid(double value)
value - the value to testpublic int compareTo(Object o)
compareTo in interface ComparableCopyright © 2011-2014. All Rights Reserved.