net.sourceforge.pmd.lang.rule.properties
Class FloatProperty
java.lang.Object
net.sourceforge.pmd.lang.rule.properties.AbstractProperty<T>
net.sourceforge.pmd.lang.rule.properties.AbstractScalarProperty<T>
net.sourceforge.pmd.lang.rule.properties.AbstractNumericProperty<Float>
net.sourceforge.pmd.lang.rule.properties.FloatProperty
- All Implemented Interfaces:
- Comparable<PropertyDescriptor<?>>, NumericPropertyDescriptor<Float>, PropertyDescriptor<Float>
public class FloatProperty
- extends AbstractNumericProperty<Float>
Defines a property type that supports single float property values within an
upper and lower boundary.
- Author:
- Brian Remedios
Constructor Summary |
FloatProperty(String theName,
String theDescription,
Float min,
Float max,
Float theDefault,
float theUIOrder)
Constructor for FloatProperty that limits itself to a single value within
the specified limits. |
FloatProperty(String theName,
String theDescription,
String minStr,
String maxStr,
String defaultStr,
float theUIOrder)
Constructor for FloatProperty that limits itself to a single value within
the specified limits. |
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 interface net.sourceforge.pmd.PropertyDescriptor |
asDelimitedString, attributeValuesById, choices, defaultValue, description, errorFor, isMultiValue, isRequired, multiValueDelimiter, name, preferredRowCount, propertyErrorFor, uiOrder, valueFrom |
FACTORY
public static final PropertyDescriptorFactory FACTORY
FloatProperty
public FloatProperty(String theName,
String theDescription,
Float min,
Float max,
Float theDefault,
float theUIOrder)
- Constructor for FloatProperty that limits itself to a single value within
the specified limits.
- Parameters:
theName
- StringtheDescription
- Stringmin
- floatmax
- floattheDefault
- floattheUIOrder
- float
- Throws:
IllegalArgumentException
FloatProperty
public FloatProperty(String theName,
String theDescription,
String minStr,
String maxStr,
String defaultStr,
float theUIOrder)
- Constructor for FloatProperty that limits itself to a single value within
the specified limits. Converts string arguments into the Float values.
- Parameters:
theName
- StringtheDescription
- StringminStr
- StringmaxStr
- StringdefaultStr
- StringtheUIOrder
- float
- Throws:
IllegalArgumentException
floatFrom
public static Float floatFrom(String numberString)
- Parameters:
numberString
- String
- Returns:
- Float
type
public Class<Float> type()
- Description copied from interface:
PropertyDescriptor
- Denotes the value datatype.
- Returns:
- Class
- See Also:
PropertyDescriptor.type()
createFrom
protected Object createFrom(String value)
- Creates an property value of the right type from a raw string.
- Specified by:
createFrom
in class AbstractScalarProperty<Float>
- Parameters:
value
- String
- Returns:
- Object
Copyright © 2002-2016 InfoEther. All Rights Reserved.