net.sourceforge.pmd.lang.rule.properties

## Class IntegerProperty

- 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<Integer>
      - - net.sourceforge.pmd.lang.rule.properties.IntegerProperty

- All Implemented Interfaces:
    Comparable<PropertyDescriptor<?>>, NumericPropertyDescriptor<Integer>, PropertyDescriptor<Integer>

      public class IntegerProperty
      extends AbstractNumericProperty<Integer>

  Defines a datatype that supports single Integer property values within an upper and lower boundary.
  Author:
    Brian Remedios

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static PropertyDescriptorFactory` | `FACTORY`

    - ### Fields inherited from class net.sourceforge.pmd.lang.rule.properties.AbstractNumericProperty

      `numberFieldTypesByKey`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IntegerProperty(String theName, String theDescription, Integer min, Integer max, Integer theDefault, float theUIOrder)` Constructor for IntegerProperty that limits itself to a single value within the specified limits.
    `IntegerProperty(String theName, String theDescription, String minStr, String maxStr, String defaultStr, float theUIOrder)` Constructor for IntegerProperty that limits itself to a single value within the specified limits.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected Object` | `createFrom(String value)`
    `static Integer` | `intFrom(String numberString)`
    `Class<Integer>` | `type()` Denotes the value datatype.

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

      `addAttributesTo, defaultAsString, lowerLimit, rangeString, upperLimit, valueErrorFor`

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

      `arrayFor, valueFrom`

    - ### 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 class java.lang.Object

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

    - ### Methods inherited from interface net.sourceforge.pmd.PropertyDescriptor

      `asDelimitedString, attributeValuesById, choices, defaultValue, description, errorFor, isMultiValue, isRequired, multiValueDelimiter, name, preferredRowCount, propertyErrorFor, uiOrder, valueFrom`

    - ### Methods inherited from interface java.lang.Comparable

      `compareTo`

- - ### Field Detail

    - #### FACTORY

          public static final PropertyDescriptorFactory FACTORY

  - ### Constructor Detail

    - #### IntegerProperty

          public IntegerProperty(String theName,
                         String theDescription,
                         Integer min,
                         Integer max,
                         Integer theDefault,
                         float theUIOrder)

      Constructor for IntegerProperty that limits itself to a single value within the specified limits.
      Parameters:
        `theName` - String
        `theDescription` - String
        `min` - Integer
        `max` - Integer
        `theDefault` - Integer
        `theUIOrder` - float
      Throws:
        `IllegalArgumentException`

    - #### IntegerProperty

          public IntegerProperty(String theName,
                         String theDescription,
                         String minStr,
                         String maxStr,
                         String defaultStr,
                         float theUIOrder)

      Constructor for IntegerProperty that limits itself to a single value within the specified limits. Converts string arguments into the Float values.
      Parameters:
        `theName` - String
        `theDescription` - String
        `minStr` - String
        `maxStr` - String
        `defaultStr` - String
        `theUIOrder` -
      Throws:
        `IllegalArgumentException`

  - ### Method Detail

    - #### intFrom

          public static Integer intFrom(String numberString)

      Parameters:
        `numberString` - String
      Returns:
        Integer

    - #### type

          public Class<Integer> type()

      Description copied from interface: `PropertyDescriptor`
      Denotes the value datatype.
      Returns:
        Class
      See Also:
        `PropertyDescriptor.type()`

    - #### createFrom

          protected Object createFrom(String value)

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

Copyright © 2002-2013 InfoEther. All Rights Reserved.