net.sourceforge.pmd.lang.rule.properties
Class DoubleProperty

java.lang.Object
  extended by net.sourceforge.pmd.lang.rule.properties.AbstractProperty<T>
      extended by net.sourceforge.pmd.lang.rule.properties.AbstractScalarProperty<T>
          extended by net.sourceforge.pmd.lang.rule.properties.AbstractNumericProperty<Double>
              extended by net.sourceforge.pmd.lang.rule.properties.DoubleProperty
All Implemented Interfaces:
Comparable<PropertyDescriptor<?>>, NumericPropertyDescriptor<Double>, PropertyDescriptor<Double>

public class DoubleProperty
extends AbstractNumericProperty<Double>

Defines a property type that support single double-type property values within an upper and lower boundary.

Author:
Brian Remedios

Field Summary
static PropertyDescriptorFactory FACTORY
           
 
Fields inherited from class net.sourceforge.pmd.lang.rule.properties.AbstractNumericProperty
NUMBER_FIELD_TYPES_BY_KEY
 
Fields inherited from class net.sourceforge.pmd.lang.rule.properties.AbstractProperty
DEFAULT_DELIMITER, DEFAULT_NUMERIC_DELIMITER
 
Constructor Summary
DoubleProperty(String theName, String theDescription, Double min, Double max, Double theDefault, float theUIOrder)
          Constructor for DoubleProperty.
DoubleProperty(String theName, String theDescription, String minStr, String maxStr, String defaultStr, float theUIOrder)
          Constructor for DoubleProperty.
 
Method Summary
protected  Object createFrom(String value)
          Deserializes a string into its Double form.
static Double doubleFrom(String numberString)
           
 Class<Double> type()
          Denotes the value datatype.
 
Methods inherited from class net.sourceforge.pmd.lang.rule.properties.AbstractNumericProperty
addAttributesTo, defaultAsString, lowerLimit, rangeString, upperLimit, valueErrorFor
 
Methods inherited from class net.sourceforge.pmd.lang.rule.properties.AbstractScalarProperty
arrayFor, valueFrom
 
Methods inherited from class net.sourceforge.pmd.lang.rule.properties.AbstractProperty
areEqual, asDelimitedString, asDelimitedString, asString, attributeValuesById, choices, compareTo, defaultHasNullValue, defaultValue, description, equals, errorFor, hashCode, isArray, isMultiValue, isRequired, multiValueDelimiter, name, preferredRowCount, propertyErrorFor, toString, typeErrorFor, uiOrder, valuesErrorFor
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sourceforge.pmd.PropertyDescriptor
asDelimitedString, attributeValuesById, choices, defaultValue, description, errorFor, isMultiValue, isRequired, multiValueDelimiter, name, preferredRowCount, propertyErrorFor, uiOrder, valueFrom
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

FACTORY

public static final PropertyDescriptorFactory FACTORY
Constructor Detail

DoubleProperty

public DoubleProperty(String theName,
                      String theDescription,
                      Double min,
                      Double max,
                      Double theDefault,
                      float theUIOrder)
Constructor for DoubleProperty.

Parameters:
theName - String
theDescription - String
min - double
max - double
theDefault - double
theUIOrder - float
Throws:
IllegalArgumentException

DoubleProperty

public DoubleProperty(String theName,
                      String theDescription,
                      String minStr,
                      String maxStr,
                      String defaultStr,
                      float theUIOrder)
Constructor for DoubleProperty.

Parameters:
theName - String
theDescription - String
minStr - String
maxStr - String
defaultStr - String
theUIOrder - float
Throws:
IllegalArgumentException
Method Detail

doubleFrom

public static Double doubleFrom(String numberString)
Parameters:
numberString - String
Returns:
Double

type

public Class<Double> type()
Description copied from interface: PropertyDescriptor
Denotes the value datatype.

Returns:
Class
See Also:
PropertyDescriptor.type()

createFrom

protected Object createFrom(String value)
Deserializes a string into its Double form.

Specified by:
createFrom in class AbstractScalarProperty<Double>
Parameters:
value - String
Returns:
Object


Copyright © 2002-2015 InfoEther. All Rights Reserved.