|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eigenbase.util.property.Property
org.eigenbase.util.property.DoubleProperty
public class DoubleProperty
Definition and accessor for a double-precision property.
| Field Summary | |
|---|---|
private double |
maxValue
|
private double |
minValue
|
| Fields inherited from class org.eigenbase.util.property.Property |
|---|
properties |
| Constructor Summary | |
|---|---|
DoubleProperty(Properties properties,
String path)
Creates a Double property which has no default value. |
|
DoubleProperty(Properties properties,
String path,
double defaultValue)
Creates a Double property. |
|
DoubleProperty(Properties properties,
String path,
double minValue,
double maxValue)
Creates a Double property which has no default value. |
|
DoubleProperty(Properties properties,
String path,
double defaultValue,
double minValue,
double maxValue)
Creates a Double property. |
|
| Method Summary | |
|---|---|
double |
get()
Retrieves the value of this double property according to these rules. |
double |
get(double defaultValue)
Retrieves the value of this double property. |
private double |
limit(double value)
Returns value limited to the range [minValue, maxValue]. |
private double |
noValue()
Returns 0.0 if that value is in the range [minValue, maxValue]. |
double |
set(double value)
Sets the value of this double property. |
| Methods inherited from class org.eigenbase.util.property.Property |
|---|
addTrigger, booleanValue, getDefaultValue, getInternal, getPath, getString, isSet, onChange, removeTrigger, setString, stringValue, toBoolean |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final double minValue
private final double maxValue
| Constructor Detail |
|---|
public DoubleProperty(Properties properties,
String path,
double defaultValue)
properties - Properties object which holds values for this property.path - Name by which this property is serialized to a properties
file, for example "com.acme.trace.Verbosity".defaultValue - Default value.
public DoubleProperty(Properties properties,
String path)
properties - Properties object which holds values for this property.path - Name by which this property is serialized to a properties
file, for example "com.acme.trace.Verbosity".
public DoubleProperty(Properties properties,
String path,
double defaultValue,
double minValue,
double maxValue)
properties - Properties object which holds values for this property.path - Name by which this property is serialized to a properties
file, for example "com.acme.trace.Verbosity".defaultValue - Default value.
IllegalArgumentException - if defaultValue is not in
the range [minValue, maxValue].
public DoubleProperty(Properties properties,
String path,
double minValue,
double maxValue)
properties - Properties object which holds values for this property.path - Name by which this property is serialized to a properties
file, for example "com.acme.trace.Verbosity".| Method Detail |
|---|
public double get()
minValue <= 0.0 <=
maxValue, returns 0.0.minValue.
public double get(double defaultValue)
public double set(double value)
private double limit(double value)
value - the value to limit
private double noValue()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||