avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-avalon/src/java/org/apache/avalon/util ValuedEnum.java
Date Thu, 22 Mar 2001 03:52:47 GMT
donaldp     01/03/21 19:52:47

  Modified:    src/java/org/apache/avalon/util ValuedEnum.java
  Log:
  Updated to allow maps to hold set of a enum
  
  Revision  Changes    Path
  1.2       +9 -2      jakarta-avalon/src/java/org/apache/avalon/util/ValuedEnum.java
  
  Index: ValuedEnum.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon/src/java/org/apache/avalon/util/ValuedEnum.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ValuedEnum.java	2001/02/24 03:59:37	1.1
  +++ ValuedEnum.java	2001/03/22 03:52:47	1.2
  @@ -7,6 +7,8 @@
    */ 
   package org.apache.avalon.util;
   
  +import java.util.Map;
  +
   /**
    * Basic enum class for type-safe enums with values. Should be used as an abstract base.
    *
  @@ -16,11 +18,16 @@
       extends Enum
   {
       protected final int        m_value;
  +
  +    public ValuedEnum( final String name, final int value, final Map map )
  +    {
  +        super( name, map );
  +        m_value = value;
  +    }
       
       public ValuedEnum( final String name, final int value )
       {
  -        super( name );
  -        m_value = value;
  +        this( name, value, null );
       } 
   
       public final int getValue()
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


Mime
View raw message