org.kuali.rice.krad.keyvalues
Class EnumValuesFinder

java.lang.Object
  extended by org.kuali.rice.krad.keyvalues.KeyValuesBase
      extended by org.kuali.rice.krad.keyvalues.EnumValuesFinder
All Implemented Interfaces:
Serializable, KeyValuesFinder
Direct Known Subclasses:
RouteNodeLookupLogicValuesFinder

public class EnumValuesFinder
extends KeyValuesBase

ValuesFinder that derives values directly from a Java enum. KeyValues are provided in enum definition order, enum name is the key, capitalized lowercase enum name is the label.

See Also:
Serialized Form

Constructor Summary
EnumValuesFinder(Class<? extends Enum> enumeration)
           
 
Method Summary
protected  String getEnumKey(Enum enm)
          Derives a key value from an enum
protected  String getEnumLabel(Enum enm)
          Derives a label value from an enum
 List<KeyValue> getKeyValues()
          Builds a list of key values representations for valid value selections.
 
Methods inherited from class org.kuali.rice.krad.keyvalues.KeyValuesBase
clearInternalCache, getKeyLabel, getKeyLabelMap, getKeyValues, getOptionLabels, getOptionValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnumValuesFinder

public EnumValuesFinder(Class<? extends Enum> enumeration)
Method Detail

getKeyValues

public List<KeyValue> getKeyValues()
Description copied from interface: KeyValuesFinder
Builds a list of key values representations for valid value selections.

Returns:
List of KeyValue objects

getEnumKey

protected String getEnumKey(Enum enm)
Derives a key value from an enum


getEnumLabel

protected String getEnumLabel(Enum enm)
Derives a label value from an enum



Copyright © 2005-2015 The Kuali Foundation. All Rights Reserved.