java.lang.Comparable<java.util.List<java.lang.Double>>, MultiValuePropertyDescriptor<java.util.List<java.lang.Double>>, NumericPropertyDescriptor<java.util.List<java.lang.Double>>, PropertyDescriptor<java.util.List<java.lang.Double>>public final class DoubleMultiProperty
extends java.lang.Object
| Modifier and Type | Class | Description |
|---|---|---|
static class |
DoubleMultiProperty.DoubleMultiPBuilder |
DEFAULT_DELIMITER, DEFAULT_NUMERIC_DELIMITER| Constructor | Description |
|---|---|
DoubleMultiProperty(java.lang.String theName,
java.lang.String theDescription,
java.lang.Double min,
java.lang.Double max,
java.lang.Double[] defaultValues,
float theUIOrder) |
Constructor using an array of defaults.
|
DoubleMultiProperty(java.lang.String theName,
java.lang.String theDescription,
java.lang.Double min,
java.lang.Double max,
java.util.List<java.lang.Double> defaultValues,
float theUIOrder) |
Constructor using a list of defaults.
|
| Modifier and Type | Method | Description |
|---|---|---|
protected void |
addAttributesTo(java.util.Map<PropertyDescriptorField,java.lang.String> attributes) |
Adds this property's attributes to the map.
|
java.lang.String |
asDelimitedString(java.util.List<V> values) |
Formats the object onto a string suitable for storage within the property map.
|
protected java.lang.String |
asString(V value) |
Returns a string representation of the value, even if it's null.
|
java.util.Map<PropertyDescriptorField,java.lang.String> |
attributeValuesById() |
Returns a map representing all the property attributes of the receiver in string form.
|
int |
compareTo(PropertyDescriptor<?> otherProperty) |
|
protected java.lang.Double |
createFrom(java.lang.String value) |
Parse a string and returns an instance of a single value (not a list).
|
protected java.lang.String |
defaultAsString() |
Returns a string representation of the default value.
|
java.util.List<V> |
defaultValue() |
Default value to use when the user hasn't specified one or when they wish to revert to a known-good state.
|
java.lang.String |
description() |
Describes the property and the role it plays within the rule it is specified for.
|
boolean |
equals(java.lang.Object obj) |
|
java.lang.String |
errorFor(java.util.List<V> values) |
Validation function that returns a diagnostic error message for a sample property value.
|
int |
hashCode() |
|
boolean |
isDefinedExternally() |
True if this descriptor was defined in the ruleset xml.
|
boolean |
isMultiValue() |
Returns whether the property is multi-valued, i.e.
|
java.lang.Number |
lowerLimit() |
Returns the minimum value that instances of the property can have.
|
char |
multiValueDelimiter() |
Return the character being used to delimit multiple property values within a single string.
|
java.lang.String |
name() |
The name of the property without spaces as it serves as the key into the property map.
|
static DoubleMultiProperty.DoubleMultiPBuilder |
named(java.lang.String name) |
|
int |
preferredRowCount() |
If the datatype is a String then return the preferred number of rows to allocate in the text widget, returns a
value of one for all other types.
|
java.lang.String |
propertyErrorFor(Rule rule) |
A convenience method that returns an error string if the rule holds onto a property value that has a problem.
|
java.lang.String |
toString() |
|
java.lang.Class<java.lang.Double> |
type() |
Denotes the value datatype.
|
float |
uiOrder() |
Denotes the relative order the property field should occupy if we are using an auto-generated UI to display and
edit property values.
|
java.lang.Number |
upperLimit() |
Returns the maximum value that instances of the property can have.
|
protected java.lang.String |
valueErrorFor(T value) |
Checks a single value for a "missing value" error.
|
java.util.List<V> |
valueFrom(java.lang.String valueString) |
Returns the value represented by this string.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitasDelimitedString, attributeValuesById, defaultValue, description, errorFor, isDefinedExternally, isMultiValue, name, preferredRowCount, propertyErrorFor, uiOrder, valueFrompublic DoubleMultiProperty(java.lang.String theName,
java.lang.String theDescription,
java.lang.Double min,
java.lang.Double max,
java.lang.Double[] defaultValues,
float theUIOrder)
theName - NametheDescription - Descriptionmin - Minimum value of the propertymax - Maximum value of the propertydefaultValues - Array of defaultstheUIOrder - UI orderjava.lang.IllegalArgumentException - if min > max or one of the defaults is not between the boundspublic DoubleMultiProperty(java.lang.String theName,
java.lang.String theDescription,
java.lang.Double min,
java.lang.Double max,
java.util.List<java.lang.Double> defaultValues,
float theUIOrder)
theName - NametheDescription - Descriptionmin - Minimum value of the propertymax - Maximum value of the propertydefaultValues - List of defaultstheUIOrder - UI orderjava.lang.IllegalArgumentException - if min > max or one of the defaults is not between the boundspublic java.lang.Class<java.lang.Double> type()
PropertyDescriptorprotected java.lang.Double createFrom(java.lang.String value)
value - String to parsepublic static DoubleMultiProperty.DoubleMultiPBuilder named(java.lang.String name)
protected java.lang.String valueErrorFor(T value)
value - Value to checkpublic java.lang.Number lowerLimit()
NumericPropertyDescriptorlowerLimit in interface NumericPropertyDescriptor<T extends java.lang.Number>public java.lang.Number upperLimit()
NumericPropertyDescriptorupperLimit in interface NumericPropertyDescriptor<T extends java.lang.Number>protected void addAttributesTo(java.util.Map<PropertyDescriptorField,java.lang.String> attributes)
PropertyDescriptorField.attributes - The map to fillpublic final boolean isMultiValue()
PropertyDescriptorAs unary property rule properties will return a value of one, you must use the get/setProperty accessors when working with the actual values. When working with multi-value properties then the get/setProperties accessors must be used.
isMultiValue in interface PropertyDescriptor<V>public java.lang.String propertyErrorFor(Rule rule)
PropertyDescriptorpropertyErrorFor in interface PropertyDescriptor<V>rule - Rulepublic java.lang.String errorFor(java.util.List<V> values)
PropertyDescriptorerrorFor in interface PropertyDescriptor<V>values - The value to check.protected java.lang.String defaultAsString()
public java.util.List<V> defaultValue()
PropertyDescriptordefaultValue in interface PropertyDescriptor<V>public char multiValueDelimiter()
MultiValuePropertyDescriptormultiValueDelimiter in interface MultiValuePropertyDescriptor<V>protected java.lang.String asString(V value)
value - The value to describepublic final java.lang.String asDelimitedString(java.util.List<V> values)
PropertyDescriptorasDelimitedString in interface PropertyDescriptor<V>values - Objectpublic java.util.List<V> valueFrom(java.lang.String valueString)
throws java.lang.IllegalArgumentException
PropertyDescriptorvalueFrom in interface PropertyDescriptor<V>valueString - The string to parsejava.lang.IllegalArgumentException - if the given string cannot be parsedpublic java.lang.String description()
PropertyDescriptordescription in interface PropertyDescriptor<T>public float uiOrder()
PropertyDescriptorExample:
name -> 0.0 description 1.0 minValue -> 2.0 maxValue -> 2.1
name: [ ] description: [ ] minimum: [ ] maximum: [ ]uiOrder in interface PropertyDescriptor<T>public final int compareTo(PropertyDescriptor<?> otherProperty)
compareTo in interface java.lang.Comparable<T>public int preferredRowCount()
PropertyDescriptorpreferredRowCount in interface PropertyDescriptor<T>public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String name()
PropertyDescriptorname in interface PropertyDescriptor<T>public final java.util.Map<PropertyDescriptorField,java.lang.String> attributeValuesById()
PropertyDescriptorattributeValuesById in interface PropertyDescriptor<T>public boolean isDefinedExternally()
PropertyDescriptorRuleSetWriter
to write out the property correctly: if it was defined externally, then its definition must be written out,
otherwise only its value.isDefinedExternally in interface PropertyDescriptor<T>Copyright © 2002–2018 PMD. All rights reserved.