org.eigenbase.util.property
Class DoubleProperty

java.lang.Object
  extended by org.eigenbase.util.property.Property
      extended by org.eigenbase.util.property.DoubleProperty

public class DoubleProperty
extends Property

Definition and accessor for a double-precision property.

Since:
July 5, 2005
Version:
$Id: //open/dt/dev/farrago/src/org/eigenbase/util/property/DoubleProperty.java#1 $
Author:
jhyde

Field Summary
 
Fields inherited from class org.eigenbase.util.property.Property
properties
 
Constructor Summary
DoubleProperty(java.util.Properties properties, java.lang.String path)
          Creates a Double property which has no default value.
DoubleProperty(java.util.Properties properties, java.lang.String path, double defaultValue)
          Creates a Double property.
 
Method Summary
 double get()
          Retrieves the value of this double property.
 double get(int defaultValue)
          Retrieves 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
 

Constructor Detail

DoubleProperty

public DoubleProperty(java.util.Properties properties,
                      java.lang.String path,
                      double defaultValue)
Creates a Double property.

Parameters:
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.

DoubleProperty

public DoubleProperty(java.util.Properties properties,
                      java.lang.String path)
Creates a Double property which has no default value.

Parameters:
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

get

public double get()
Retrieves the value of this double property. If the property has no value, returns the default value. If there is no default value, returns 0.0.


get

public double get(int defaultValue)
Retrieves the value of this double property. If the property has no value, returns the default value. If there is no default value, returns the given default value.