net.sourceforge.pmd.lang.rule.properties
Class AbstractNumericProperty<T>
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<T>
- Type Parameters:
T
-
- All Implemented Interfaces:
- Comparable<PropertyDescriptor<?>>, NumericPropertyDescriptor<T>, PropertyDescriptor<T>
- Direct Known Subclasses:
- AbstractMultiNumericProperty, DoubleProperty, FloatProperty, IntegerProperty, LongProperty
public abstract class AbstractNumericProperty<T>
- extends AbstractScalarProperty<T>
- implements NumericPropertyDescriptor<T>
Maintains a pair of boundary limit values between which all values managed by
the subclasses must fit.
- Author:
- Brian Remedios
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, type, uiOrder, valueFrom |
NUMBER_FIELD_TYPES_BY_KEY
public static final Map<String,Boolean> NUMBER_FIELD_TYPES_BY_KEY
AbstractNumericProperty
protected AbstractNumericProperty(String theName,
String theDescription,
Number lower,
Number upper,
T theDefault,
float theUIOrder)
- Parameters:
theName
- theDescription
- lower
- upper
- theDefault
- theUIOrder
-
- Throws:
IllegalArgumentException
lowerLimit
public Number lowerLimit()
- Returns the minimum value that instances of the property can have
- Specified by:
lowerLimit
in interface NumericPropertyDescriptor<T>
- Returns:
- The minimum value.
- See Also:
NumericPropertyDescriptor.lowerLimit()
defaultAsString
protected String defaultAsString()
- Overrides:
defaultAsString
in class AbstractProperty<T>
- Returns:
- String
upperLimit
public Number upperLimit()
- Returns the maximum value that instances of the property can have
- Specified by:
upperLimit
in interface NumericPropertyDescriptor<T>
- Returns:
- The maximum value.
- See Also:
NumericPropertyDescriptor.upperLimit()
rangeString
public String rangeString()
- Returns:
- String
valueErrorFor
protected String valueErrorFor(Object value)
- Returns a string describing any error the value may have when
characterized by the receiver.
- Overrides:
valueErrorFor
in class AbstractProperty<T>
- Parameters:
value
- Object
- Returns:
- String
addAttributesTo
protected void addAttributesTo(Map<String,String> attributes)
- Method addAttributesTo.
- Overrides:
addAttributesTo
in class AbstractProperty<T>
- Parameters:
attributes
- Map
Copyright © 2002-2015 InfoEther. All Rights Reserved.