|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.mcdermottroe.exemplar.ui.options.Option<Enum>
com.mcdermottroe.exemplar.ui.options.Enum
public class Enum
Option type for dealing with enumerated options. These are options that take one or more values from a fixed set.
| Field Summary | |
|---|---|
protected Map<String,String> |
enumValues
The allowed values. |
| Fields inherited from class com.mcdermottroe.exemplar.ui.options.Option |
|---|
caseSensitive, description, mandatory, multiValue, name, value |
| Constructor Summary | |
|---|---|
Enum(String enumName,
String enumDesc,
Map<String,String> enumVals,
boolean isMandatory,
boolean isMultiValue,
boolean isCaseSensitive,
Set<String> defaultValues)
Constructor that just initializes the member variables. |
|
| Method Summary | |
|---|---|
int |
compareTo(Enum other)
Implement Comparable.compareTo(Object). |
Enum |
getCopy()
Creates a deep copy of the current object and returns it. |
Map<String,String> |
getEnumValues()
Accessor for the allowed values of this Enum. |
| Methods inherited from class com.mcdermottroe.exemplar.ui.options.Option |
|---|
equals, getDescription, getName, getValue, hashCode, isCaseSensitive, isMandatory, isMultiValue, setValue, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final Map<String,String> enumValues
| Constructor Detail |
|---|
public Enum(String enumName,
String enumDesc,
Map<String,String> enumVals,
boolean isMandatory,
boolean isMultiValue,
boolean isCaseSensitive,
Set<String> defaultValues)
enumName - The name of this enumerated option.enumDesc - A description of what this option is for.enumVals - The values that this option may take. This
is a map where the keys are the values that
the Enum may take and the values are the
descriptions of what those values do.isMandatory - Set if this option must be set by the user.isMultiValue - Set if more than one value from the fixed
set can be passed to this option.isCaseSensitive - Set if the value(s) given are case
sensitive.defaultValues - Default value(s) to set this option to.| Method Detail |
|---|
public int compareTo(Enum other)
Comparable.compareTo(Object).
compareTo in interface Comparable<Enum>compareTo in class Option<Enum>other - The Option to compare with.
Comparable.compareTo(Object).public Map<String,String> getEnumValues()
Map where the keys are the allowed
values for this Enum and the values are the descriptions of
what the values do.public Enum getCopy()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||