Package net.sourceforge.pmd.properties
Class BooleanMultiProperty
- java.lang.Object
- 
- net.sourceforge.pmd.properties.BooleanMultiProperty
 
- 
- All Implemented Interfaces:
- java.lang.Comparable<PropertyDescriptor<?>>,- MultiValuePropertyDescriptor<java.lang.Boolean>,- PropertyDescriptor<java.util.List<java.lang.Boolean>>
 
 @Deprecated public final class BooleanMultiProperty extends java.lang.ObjectDeprecated.Not useful, will be removed with 7.0.0Defines a property type that supports multiple Boolean values.- Author:
- Brian Remedios
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classBooleanMultiProperty.BooleanMultiPBuilderDeprecated.Not useful, will be removed with 7.0.0
 - 
Field Summary- 
Fields inherited from interface net.sourceforge.pmd.properties.MultiValuePropertyDescriptorDEFAULT_DELIMITER, DEFAULT_NUMERIC_DELIMITER
 
- 
 - 
Constructor SummaryConstructors Constructor Description BooleanMultiProperty(java.lang.String theName, java.lang.String theDescription, java.lang.Boolean[] defaultValues, float theUIOrder)Deprecated.Not useful, will be removed with 7.0.0BooleanMultiProperty(java.lang.String theName, java.lang.String theDescription, java.util.List<java.lang.Boolean> defaultValues, float theUIOrder)Deprecated.Not useful, will be removed with 7.0.0
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidaddAttributesTo(java.util.Map<PropertyDescriptorField,java.lang.String> attributes)Deprecated.Adds this property's attributes to the map.java.lang.StringasDelimitedString(java.util.List<V> values)Deprecated.Formats the object onto a string suitable for storage within the property map.protected java.lang.StringasString(V value)Deprecated.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.intcompareTo(PropertyDescriptor<?> otherProperty)protected java.lang.BooleancreateFrom(java.lang.String toParse)Deprecated.Parse a string and returns an instance of a single value (not a list).protected java.lang.StringdefaultAsString()Deprecated.Returns a string representation of the default value.java.util.List<V>defaultValue()Deprecated.Default value to use when the user hasn't specified one or when they wish to revert to a known-good state.java.lang.Stringdescription()Describes the property and the role it plays within the rule it is specified for.booleanequals(java.lang.Object obj)java.lang.StringerrorFor(java.util.List<V> values)Deprecated.Validation function that returns a diagnostic error message for a sample property value.inthashCode()booleanisDefinedExternally()True if this descriptor was defined in the ruleset xml.booleanisMultiValue()Deprecated.Returns whether the property is multi-valued, i.e.charmultiValueDelimiter()Deprecated.Return the character being used to delimit multiple property values within a single string.java.lang.Stringname()The name of the property without spaces as it serves as the key into the property map.static BooleanMultiProperty.BooleanMultiPBuildernamed(java.lang.String name)Deprecated.Not useful, will be removed with 7.0.0intpreferredRowCount()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.StringpropertyErrorFor(Rule rule)Deprecated.A convenience method that returns an error string if the rule holds onto a property value that has a problem.java.lang.StringtoString()java.lang.Class<java.lang.Boolean>type()Deprecated.Denotes the value datatype.floatuiOrder()Denotes the relative order the property field should occupy if we are using an auto-generated UI to display and edit property values.protected java.lang.StringvalueErrorFor(V value)Deprecated.Checks a single value for a "missing value" error.java.util.List<V>valueFrom(java.lang.String valueString)Deprecated.Returns the value represented by this string.- 
Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface net.sourceforge.pmd.properties.PropertyDescriptorattributeValuesById, compareTo, description, isDefinedExternally, name, preferredRowCount, uiOrder
 
- 
 
- 
- 
- 
Constructor Detail- 
BooleanMultiProperty@Deprecated public BooleanMultiProperty(java.lang.String theName, java.lang.String theDescription, java.lang.Boolean[] defaultValues, float theUIOrder)Deprecated.Not useful, will be removed with 7.0.0Constructor using an array of defaults.- Parameters:
- theName- Name
- theDescription- Description
- defaultValues- List of defaults
- theUIOrder- UI order
 
 - 
BooleanMultiProperty@Deprecated public BooleanMultiProperty(java.lang.String theName, java.lang.String theDescription, java.util.List<java.lang.Boolean> defaultValues, float theUIOrder)Deprecated.Not useful, will be removed with 7.0.0Constructor using a list of defaults.- Parameters:
- theName- Name
- theDescription- Description
- defaultValues- List of defaults
- theUIOrder- UI order
 
 
- 
 - 
Method Detail- 
createFromprotected java.lang.Boolean createFrom(java.lang.String toParse) Deprecated.Parse a string and returns an instance of a single value (not a list).- Parameters:
- toParse- String to parse
- Returns:
- An instance of a value
 
 - 
typepublic java.lang.Class<java.lang.Boolean> type() Deprecated.Description copied from interface:PropertyDescriptorDenotes the value datatype. For multi value properties, this is not the List class but the list's component class.- Returns:
- Class literal of the value type
 
 - 
named@Deprecated public static BooleanMultiProperty.BooleanMultiPBuilder named(java.lang.String name) Deprecated.Not useful, will be removed with 7.0.0
 - 
isMultiValuepublic final boolean isMultiValue() Deprecated.Description copied from interface:PropertyDescriptorReturns whether the property is multi-valued, i.e. an array of strings,As 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. - Specified by:
- isMultiValuein interface- PropertyDescriptor<V>
- Returns:
- boolean
 
 - 
propertyErrorForpublic java.lang.String propertyErrorFor(Rule rule) Deprecated.Description copied from interface:PropertyDescriptorA convenience method that returns an error string if the rule holds onto a property value that has a problem. Returns null otherwise.- Specified by:
- propertyErrorForin interface- PropertyDescriptor<V>
- Parameters:
- rule- Rule
- Returns:
- String
 
 - 
errorForpublic java.lang.String errorFor(java.util.List<V> values) Deprecated.Description copied from interface:PropertyDescriptorValidation function that returns a diagnostic error message for a sample property value. Returns null if the value is acceptable.- Specified by:
- errorForin interface- PropertyDescriptor<V>
- Parameters:
- values- The value to check.
- Returns:
- A diagnostic message.
 
 - 
valueErrorForprotected java.lang.String valueErrorFor(V value) Deprecated.Checks a single value for a "missing value" error.- Parameters:
- value- Value to check
- Returns:
- A descriptive String of the error or null if there was none
 
 - 
defaultAsStringprotected java.lang.String defaultAsString() Deprecated.Returns a string representation of the default value.- Returns:
- A string representation of the default value.
 
 - 
defaultValuepublic java.util.List<V> defaultValue() Deprecated.Description copied from interface:PropertyDescriptorDefault value to use when the user hasn't specified one or when they wish to revert to a known-good state.- Specified by:
- defaultValuein interface- PropertyDescriptor<V>
- Returns:
- Object
 
 - 
multiValueDelimiterpublic char multiValueDelimiter() Deprecated.Description copied from interface:MultiValuePropertyDescriptorReturn the character being used to delimit multiple property values within a single string. You must ensure that this character does not appear within any rule property values to avoid deserialization errors.- Specified by:
- multiValueDelimiterin interface- MultiValuePropertyDescriptor<V>
- Returns:
- char
 
 - 
asStringprotected java.lang.String asString(V value) Deprecated.Returns a string representation of the value, even if it's null.- Parameters:
- value- The value to describe
- Returns:
- A string representation of the value
 
 - 
asDelimitedStringpublic final java.lang.String asDelimitedString(java.util.List<V> values) Deprecated.Description copied from interface:PropertyDescriptorFormats the object onto a string suitable for storage within the property map.- Specified by:
- asDelimitedStringin interface- PropertyDescriptor<V>
- Parameters:
- values- Object
- Returns:
- String
 
 - 
valueFrompublic java.util.List<V> valueFrom(java.lang.String valueString) throws java.lang.IllegalArgumentExceptionDeprecated.Description copied from interface:PropertyDescriptorReturns the value represented by this string.- Specified by:
- valueFromin interface- PropertyDescriptor<V>
- Parameters:
- valueString- The string to parse
- Returns:
- The value represented by the string
- Throws:
- java.lang.IllegalArgumentException- if the given string cannot be parsed
 
 - 
addAttributesToprotected void addAttributesTo(java.util.Map<PropertyDescriptorField,java.lang.String> attributes) Deprecated.Adds this property's attributes to the map. Subclasses can override this to add morePropertyDescriptorField.- Parameters:
- attributes- The map to fill
 
 - 
descriptionpublic java.lang.String description() Description copied from interface:PropertyDescriptorDescribes the property and the role it plays within the rule it is specified for. Could be used in a tooltip.- Specified by:
- descriptionin interface- PropertyDescriptor<T>
- Returns:
- String
 
 - 
uiOrderpublic float uiOrder() Description copied from interface:PropertyDescriptorDenotes the relative order the property field should occupy if we are using an auto-generated UI to display and edit property values. If the value returned has a non-zero fractional part then this is can be used to place adjacent fields on the same row.- Specified by:
- uiOrderin interface- PropertyDescriptor<T>
- Returns:
- The relative order compared to other properties of the same rule
 
 - 
compareTopublic final int compareTo(PropertyDescriptor<?> otherProperty) - Specified by:
- compareToin interface- java.lang.Comparable<T>
- Specified by:
- compareToin interface- PropertyDescriptor<T>
 
 - 
preferredRowCountpublic int preferredRowCount() Description copied from interface:PropertyDescriptorIf 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. Useful for multi-line XPATH editors.- Specified by:
- preferredRowCountin interface- PropertyDescriptor<T>
- Returns:
- int
 
 - 
equalspublic boolean equals(java.lang.Object obj) - Overrides:
- equalsin class- java.lang.Object
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
namepublic java.lang.String name() Description copied from interface:PropertyDescriptorThe name of the property without spaces as it serves as the key into the property map.- Specified by:
- namein interface- PropertyDescriptor<T>
- Returns:
- String
 
 - 
attributeValuesByIdpublic final java.util.Map<PropertyDescriptorField,java.lang.String> attributeValuesById() Description copied from interface:PropertyDescriptorReturns a map representing all the property attributes of the receiver in string form.- Specified by:
- attributeValuesByIdin interface- PropertyDescriptor<T>
- Returns:
- map
 
 - 
isDefinedExternallypublic boolean isDefinedExternally() Description copied from interface:PropertyDescriptorTrue if this descriptor was defined in the ruleset xml. This precision is necessary for theRuleSetWriterto write out the property correctly: if it was defined externally, then its definition must be written out, otherwise only its value.- Specified by:
- isDefinedExternallyin interface- PropertyDescriptor<T>
- Returns:
- True if the descriptor was defined in xml
 
 
- 
 
-