org.codehaus.plexus.archiver.util
public abstract class EnumeratedAttribute extends Object
See org.apache.tools.ant.taskdefs.FixCRLF FixCRLF
for an
example.
Field Summary | |
---|---|
int | index
the index of the selected value in the array. |
protected String | value
The selected value in this enumeration. |
Constructor Summary | |
---|---|
protected | EnumeratedAttribute()
bean constructor |
Method Summary | |
---|---|
boolean | containsValue(String value)
Is this value included in the enumeration? |
int | getIndex() |
String | getValue() |
abstract String[] | getValues()
This is the only method a subclass needs to implement.
|
int | indexOfValue(String value)
get the index of a value in this enumeration.
|
void | setValue(String value)
Invoked by org.apache.tools.ant.IntrospectionHelper IntrospectionHelper . |
String | toString()
Convert the value to its string form.
|
Returns: the index of the selected value in the array.
See Also: getValues
Returns: the selected value.
Returns: an array holding all possible values of the enumeration. The order of elements must be fixed so that indexOfValue(String) always return the same index for the same value.
Parameters: value the string value to look for.
Returns: the index of the value in the array of strings or -1 if it cannot be found.
See Also: getValues
org.apache.tools.ant.IntrospectionHelper IntrospectionHelper
.Returns: the string form of the value.