Browse Source

- add getter for index and change attribute modifier.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270670 13f79535-47bb-0310-9956-ffa450edef68
master
Stephane Bailliez 23 years ago
parent
commit
b400bb775a
1 changed files with 10 additions and 2 deletions
  1. +10
    -2
      src/main/org/apache/tools/ant/types/EnumeratedAttribute.java

+ 10
- 2
src/main/org/apache/tools/ant/types/EnumeratedAttribute.java View File

@@ -75,7 +75,7 @@ public abstract class EnumeratedAttribute {
/**
* the index of the selected value in the array.
*/
protected int index;
private int index = -1;

/**
* This is the only method a subclass needs to implement.
@@ -130,9 +130,17 @@ public abstract class EnumeratedAttribute {
}

/**
* Retrieves the value.
* @return the selected value.
*/
public final String getValue() {
return value;
}

/**
* @return the index of the selected value in the array.
* @see #getValues()
*/
public final int getIndex() {
return index;
}
}

Loading…
Cancel
Save