sbailliez    02/01/11 13:03:57

  Modified:    src/main/org/apache/tools/ant/types EnumeratedAttribute.java
  Log:
  - add getter for index and change attribute modifier.
  
  Revision  Changes    Path
  1.7       +10 -2     
jakarta-ant/src/main/org/apache/tools/ant/types/EnumeratedAttribute.java
  
  Index: EnumeratedAttribute.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/EnumeratedAttribute.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- EnumeratedAttribute.java  10 Jan 2002 11:21:20 -0000      1.6
  +++ EnumeratedAttribute.java  11 Jan 2002 21:03:57 -0000      1.7
  @@ -75,7 +75,7 @@
       /**
        * 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 @@
       }
   
       /**
  -     * 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;
       }
   }
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to