hivemind-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject cvs commit: jakarta-hivemind/framework/src/java/org/apache/hivemind/conditional TokenType.java
Date Thu, 30 Dec 2004 15:21:07 GMT
hlship      2004/12/30 07:21:07

  Modified:    framework/src/test/org/apache/hivemind/conditional
                        TestToken.java
               framework/src/java/org/apache/hivemind/conditional
                        TokenType.java
  Log:
  Check in more support for conditional contributions.
  
  Revision  Changes    Path
  1.2       +0 -1      jakarta-hivemind/framework/src/test/org/apache/hivemind/conditional/TestToken.java
  
  Index: TestToken.java
  ===================================================================
  RCS file: /home/cvs/jakarta-hivemind/framework/src/test/org/apache/hivemind/conditional/TestToken.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestToken.java	30 Dec 2004 15:18:17 -0000	1.1
  +++ TestToken.java	30 Dec 2004 15:21:06 -0000	1.2
  @@ -28,7 +28,6 @@
       public void testTokenTypeToString()
       {
           assertEquals("SYMBOL", TokenType.SYMBOL.toString());
  -        assertEquals(TokenType.SYMBOL_CODE, TokenType.SYMBOL.getCode());
       }
   
       public void testTokenToStringNoValue()
  
  
  
  1.2       +9 -35     jakarta-hivemind/framework/src/java/org/apache/hivemind/conditional/TokenType.java
  
  Index: TokenType.java
  ===================================================================
  RCS file: /home/cvs/jakarta-hivemind/framework/src/java/org/apache/hivemind/conditional/TokenType.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TokenType.java	30 Dec 2004 15:18:17 -0000	1.1
  +++ TokenType.java	30 Dec 2004 15:21:07 -0000	1.2
  @@ -22,85 +22,59 @@
    */
   class TokenType
   {
  -    // Each type has a code number, useful for switch statements.
  -
  -    static final int OPAREN_CODE = 0;
  -
  -    static final int CPAREN_CODE = 1;
  -
  -    static final int AND_CODE = 2;
  -
  -    static final int OR_CODE = 3;
  -
  -    static final int NOT_CODE = 4;
  -
  -    static final int PROPERTY_CODE = 5;
  -
  -    static final int CLASS_CODE = 6;
  -
  -    static final int SYMBOL_CODE = 7;
  -
       /**
        * An open parenthesis.
        */
   
  -    static final TokenType OPAREN = new TokenType("OPAREN", OPAREN_CODE);
  +    static final TokenType OPAREN = new TokenType("OPAREN");
   
       /**
        * A close parenthesis.
        */
   
  -    static final TokenType CPAREN = new TokenType("CPAREN", CPAREN_CODE);
  +    static final TokenType CPAREN = new TokenType("CPAREN");
   
       /**
        * The keyword "and"
        */
   
  -    static final TokenType AND = new TokenType("AND", AND_CODE);
  +    static final TokenType AND = new TokenType("AND");
   
       /**
        * The keyword "or"
        */
   
  -    static final TokenType OR = new TokenType("OR", OR_CODE);
  +    static final TokenType OR = new TokenType("OR");
   
       /**
        * The keyword "not"
        */
   
  -    static final TokenType NOT = new TokenType("NOT", NOT_CODE);
  +    static final TokenType NOT = new TokenType("NOT");
   
       /**
        * The keyword "property"
        */
   
  -    static final TokenType PROPERTY = new TokenType("PROPERTY", PROPERTY_CODE);
  +    static final TokenType PROPERTY = new TokenType("PROPERTY");
   
       /**
        * The keyword "class"
        */
   
  -    static final TokenType CLASS = new TokenType("CLASS", CLASS_CODE);
  +    static final TokenType CLASS = new TokenType("CLASS");
   
       /**
        * A symbol.
        */
   
  -    static final TokenType SYMBOL = new TokenType("SYMBOL", SYMBOL_CODE);
  +    static final TokenType SYMBOL = new TokenType("SYMBOL");
   
       private String _name;
   
  -    private int _code;
  -
  -    private TokenType(String name, int code)
  +    private TokenType(String name)
       {
           _name = name;
  -        _code = code;
  -    }
  -
  -    public int getCode()
  -    {
  -        return _code;
       }
   
       public String toString()
  
  
  

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


Mime
View raw message