Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sourceforge.pmd.properties
Class EnumeratedProperty

    java.lang.Object
      net.sourceforge.pmd.properties.AbstractPMDProperty
          net.sourceforge.pmd.properties.EnumeratedProperty

All Implemented Interfaces:
  java.lang.Comparable, PropertyDescriptor

public class EnumeratedProperty
extends AbstractPMDProperty

Defines a datatype with a set of preset values of any type as held within a pair of maps. While the values are not serialized out, the labels are and serve as keys to obtain the values.

Version:
  $Revision$
Author:
  Brian Remedios

Field Summary

Fields inherited from class net.sourceforge.pmd.properties.AbstractPMDProperty
`multiValueDelimiter`

Fields inherited from interface net.sourceforge.pmd.PropertyDescriptor
`emptyPropertySet`

Constructor Summary
`EnumeratedProperty(java.lang.String theName, java.lang.String theDescription, java.lang.Object[][] theChoices, float theUIOrder)` Constructor for EnumeratedProperty.
`EnumeratedProperty(java.lang.String theName, java.lang.String theDescription, java.lang.Object[][] theChoices, float theUIOrder, int maxValues)` Constructor for EnumeratedProperty.

Method Summary
`java.lang.String` | `asDelimitedString(java.lang.Object value)` Method asDelimitedString.
`java.lang.Object[][]` | `choices()` Method choices.
`java.lang.String` | `errorFor(java.lang.Object value)` Method errorFor.
`java.lang.Class` | `type()` Method type.
`java.lang.Object` | `valueFrom(java.lang.String value)` Method valueFrom.

Methods inherited from class net.sourceforge.pmd.properties.AbstractPMDProperty
`areEqual, asString, compareTo, defaultValue, description, isArray, isRequired, maxValueCount, maxValueCount, multiValueDelimiter, multiValueDelimiter, name, preferredRowCount, propertyErrorFor, typeErrorFor, uiOrder, valueErrorFor`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### EnumeratedProperty

    public EnumeratedProperty(java.lang.String theName,
                              java.lang.String theDescription,
                              java.lang.Object[][] theChoices,
                              float theUIOrder)

  Constructor for EnumeratedProperty.

Parameters:
  `theName` - String
  `theDescription` - String
  `theChoices` - Object[][]
  `theUIOrder` - float

### EnumeratedProperty

    public EnumeratedProperty(java.lang.String theName,
                              java.lang.String theDescription,
                              java.lang.Object[][] theChoices,
                              float theUIOrder,
                              int maxValues)

  Constructor for EnumeratedProperty.

Parameters:
  `theName` - String
  `theDescription` - String
  `theChoices` - Object[][]
  `theUIOrder` - float
  `maxValues` - int

Method Detail

### type

    public java.lang.Class type()

  Method type.

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

### choices

    public java.lang.Object[][] choices()

  Method choices.

  Specified by:
    `choices` in interface `PropertyDescriptor`
  Overrides:
    `choices` in class `AbstractPMDProperty`
  Returns:
    Object[][]
  See Also:
    `PropertyDescriptor.choices()`

### errorFor

    public java.lang.String errorFor(java.lang.Object value)

  Method errorFor.

  Specified by:
    `errorFor` in interface `PropertyDescriptor`
  Overrides:
    `errorFor` in class `AbstractPMDProperty`
  Parameters:
    `value` - Object
  Returns:
    String
  See Also:
    `PropertyDescriptor.errorFor(Object)`

### valueFrom

    public java.lang.Object valueFrom(java.lang.String value)
                               throws java.lang.IllegalArgumentException

  Method valueFrom.

  Parameters:
    `value` - String
  Returns:
    Object
  Throws:
    `java.lang.IllegalArgumentException`
  See Also:
    `PropertyDescriptor.valueFrom(String)`

### asDelimitedString

    public java.lang.String asDelimitedString(java.lang.Object value)

  Method asDelimitedString.

  Specified by:
    `asDelimitedString` in interface `PropertyDescriptor`
  Overrides:
    `asDelimitedString` in class `AbstractPMDProperty`
  Parameters:
    `value` - Object
  Returns:
    String
  See Also:
    `PropertyDescriptor.asDelimitedString(Object)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2006 InfoEther. All Rights Reserved.