de.upb.swt.mcie.parser.token
Class Const

java.lang.Object
  extended by de.upb.swt.mcie.parser.token.Token
      extended by de.upb.swt.mcie.parser.token.Const

public class Const
extends Token

Implements a token for a constant.

Author:
Ekkart Kindler, kindler@upb.de

Field Summary
private  int value
          The value of the constant.
 
Constructor Summary
Const(int value)
          Constructs a token for a constant with the given value.
 
Method Summary
 int getValue()
          Returns the value of the constant.
 
Methods inherited from class de.upb.swt.mcie.parser.token.Token
setReference, toString
 
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 constant. Though the token refers to a boolean constant, its value is encoded as an int.

Constructor Detail

Const

public Const(int value)
Constructs a token for a constant with the given value.

Method Detail

getValue

public int getValue()
Returns the value of the constant.

Returns:
the value of the associated constant