net.sourceforge.pmd.lang.rule.properties

## Class BooleanProperty

- java.lang.Object
- - net.sourceforge.pmd.lang.rule.properties.AbstractProperty<T>
  - - net.sourceforge.pmd.lang.rule.properties.AbstractScalarProperty<Boolean>
    - - net.sourceforge.pmd.lang.rule.properties.BooleanProperty

All Implemented Interfaces:
  Comparable<PropertyDescriptor<?>>, PropertyDescriptor<Boolean>

    public class BooleanProperty
    extends AbstractScalarProperty<Boolean>

Defines a property type that supports single Boolean values.

Author:
  Brian Remedios

### Field Summary

Fields
`static PropertyDescriptorFactory` `FACTORY`

### Constructor Summary

Constructors
Constructor and Description
`BooleanProperty(String theName, String theDescription, Boolean defaultValue, float theUIOrder)` Constructor for BooleanProperty limited to a single value.
`BooleanProperty(String theName, String theDescription, String defaultBoolStr, float theUIOrder)` Constructor for BooleanProperty limited to a single value.

### Method Summary

Methods
`protected Object` `createFrom(String value)` Creates and returns a Boolean instance from a raw string
`protected String` `defaultAsString()`
`Class<Boolean>` `type()` Denotes the value datatype.

### Methods inherited from class net.sourceforge.pmd.lang.rule.properties.AbstractScalarProperty

`arrayFor, valueFrom`

### Methods inherited from class net.sourceforge.pmd.lang.rule.properties.AbstractProperty

`addAttributesTo, areEqual, asDelimitedString, asDelimitedString, asString, attributeValuesById, choices, compareTo, defaultHasNullValue, defaultValue, description, equals, errorFor, hashCode, isArray, isMultiValue, isRequired, multiValueDelimiter, name, preferredRowCount, propertyErrorFor, toString, typeErrorFor, uiOrder, valueErrorFor, valuesErrorFor`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Field Detail

#### FACTORY

    public static final PropertyDescriptorFactory FACTORY

### Constructor Detail

#### BooleanProperty

    public BooleanProperty(String theName,
                   String theDescription,
                   Boolean defaultValue,
                   float theUIOrder)

Constructor for BooleanProperty limited to a single value.

Parameters:
  `theName` - String
  `theDescription` - String
  `defaultValue` - boolean
  `theUIOrder` - float

#### BooleanProperty

    public BooleanProperty(String theName,
                   String theDescription,
                   String defaultBoolStr,
                   float theUIOrder)

Constructor for BooleanProperty limited to a single value. Converts default argument string into a boolean.

Parameters:
  `theName` - String
  `theDescription` - String
  `defaultBoolStr` - String
  `theUIOrder` - float

### Method Detail

#### type

    public Class<Boolean> type()

Description copied from interface: `PropertyDescriptor`
Denotes the value datatype.

Returns:
  Class
See Also:
  `PropertyDescriptor.type()`

#### defaultAsString

    protected String defaultAsString()

Specified by:
  `defaultAsString` in class `AbstractProperty<Boolean>`
Returns:
  String

#### createFrom

    protected Object createFrom(String value)

Creates and returns a Boolean instance from a raw string

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