org.quattor.pan.dml.data
Class DoubleProperty

java.lang.Object
  extended by org.quattor.pan.dml.data.Element
      extended by org.quattor.pan.dml.data.PersistentElement
          extended by org.quattor.pan.dml.data.Property
              extended by org.quattor.pan.dml.data.NumberProperty
                  extended by org.quattor.pan.dml.data.DoubleProperty
All Implemented Interfaces:
Operation

@Immutable
public final class DoubleProperty
extends NumberProperty

Represents a double value.

Author:
loomis

Method Summary
 void checkRange(Range range)
          Determine if the element satisfies the given range constraint.
 double doubleValue()
          All number classes must implement this method which is used to facilitate type conversion in mixed-type, arithmetic expressions.
static DoubleProperty getInstance(double value)
           
static DoubleProperty getInstance(java.lang.Double value)
           
static DoubleProperty getInstance(java.lang.String value)
           
 java.lang.String getTypeAsString()
          All Elements must return a string describing its type.
 java.lang.Double getValue()
          Return the value of this property as an Object.
 
Methods inherited from class org.quattor.pan.dml.data.Property
equals, hashCode, toString
 
Methods inherited from class org.quattor.pan.dml.data.Element
checkInvalidSelfContext, checkRestrictedContext, checkValidReplacement, defined, duplicate, execute, exists, isBoolean, isDouble, isList, isLong, isNlist, isPersistent, isProperty, isProtected, isResource, isString, isTransient, locateUndefinedElement, protect, rget, rgetList, rput, writableCopy
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getInstance

public static DoubleProperty getInstance(double value)

getInstance

public static DoubleProperty getInstance(java.lang.Double value)

getInstance

public static DoubleProperty getInstance(java.lang.String value)

checkRange

public void checkRange(Range range)
                throws ValidationException
Description copied from class: Element
Determine if the element satisfies the given range constraint. This is used in the validation of the element. By default, this method with throw a ValidationException indicating that range checking of this element is not appropriate.

Overrides:
checkRange in class Element
Parameters:
range - Range to check Element against
Throws:
ValidationException - if the element cannot be compared to a range or if the element doesn't meet the range requirement

doubleValue

public double doubleValue()
Description copied from class: NumberProperty
All number classes must implement this method which is used to facilitate type conversion in mixed-type, arithmetic expressions.

Specified by:
doubleValue in class NumberProperty
Returns:
value of this number as a double

getValue

public java.lang.Double getValue()
Description copied from class: Property
Return the value of this property as an Object. Subclasses may override this method to provide a more specific return type. Subclasses will have to call this method to obtain the value because the value itself is private.

Overrides:
getValue in class Property
Returns:
value of this property as an Object

getTypeAsString

public java.lang.String getTypeAsString()
Description copied from class: Element
All Elements must return a string describing its type. This value used in the serialization to machine profiles.

Specified by:
getTypeAsString in class Element
Returns:
String representation of Element's type


Copyright © 2011 Quattor. All Rights Reserved.