KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jmock > examples > calculator > Token


1 /* Copyright (c) 2000-2004 jMock.org
2  */

3 package org.jmock.examples.calculator;
4
5 public class Token
6 {
7
8     public static final int END = 0;
9     public static final int NUMBER = 1;
10     public static final int IDENTIFIER = 2;
11     public static final int ADD = 3;
12     public static final int SUBTRACT = 4;
13     public static final int MULTIPLY = 5;
14     public static final int DIVIDE = 6;
15     public static final int POWER = 7;
16     public static final int PAREN_OPEN = 8;
17     public static final int PAREN_CLOSE = 9;
18
19     private int type;
20     private String JavaDoc value;
21
22     public Token( int type, String JavaDoc value ) {
23         this.type = type;
24         this.value = value;
25     }
26
27     public int getType() {
28         return type;
29     }
30
31     public String JavaDoc getValue() {
32         return value;
33     }
34 }
35
Popular Tags