itec.minicompiler
Class NumberToken

java.lang.Object
  extended byitec.minicompiler.Token
      extended byitec.minicompiler.NumberToken

public class NumberToken
extends Token

The NumberToken implements a number found in the source code. It contains the value of the number together with the the kind.

Version:
1.0 (29.09.2004)
Author:
Stefan Leitner, Stefan Schauer

Field Summary
private  int value
          The value of the number represented by the NumberToken
 
Fields inherited from class itec.minicompiler.Token
 
Constructor Summary
NumberToken(int k, int v)
          Initialize the NumberToken with a kind k and a value v.
 
Method Summary
 int getValue()
          Return the value of the actual NumberToken.
 void setValue(int v)
          Set the value of the actual NumberToken.
 java.lang.String toString()
          Generate a String-representation of the NumberToken.
 
Methods inherited from class itec.minicompiler.Token
getKind, setKind
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

value

private int value
The value of the number represented by the NumberToken

Constructor Detail

NumberToken

public NumberToken(int k,
                   int v)
Initialize the NumberToken with a kind k and a value v.

Parameters:
k - The kind of the NumberToken
v - The value of the represented number
Method Detail

getValue

public int getValue()
Return the value of the actual NumberToken.

Returns:
The value of the represented number

setValue

public void setValue(int v)
Set the value of the actual NumberToken.

Parameters:
v - The new value of the NumberToken

toString

public java.lang.String toString()
Generate a String-representation of the NumberToken.

See Also:
Object.toString()