Package de.xima.fc.workflow.parser.infix
Interface IToken<TConstant extends IConstant,TOperator extends IOperator>
-
- Type Parameters:
TConstant- Type of the implementation for constant symbols.TOperator- Type of the implementation for operator symbols.
public interface IToken<TConstant extends IConstant,TOperator extends IOperator>The representation of a token encountered in an infix expression.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TConstantgetConstant()ObjectgetData()ETokenKindgetKind()TOperatorgetOperator()ISourcePositiongetSourcePosition()StringgetVariableName()
-
-
-
Method Detail
-
getConstant
TConstant getConstant()
- Returns:
- The constant if the kind of this token is
ETokenKind.CONSTANT.
-
getData
Object getData()
- Returns:
- The data of this token, type depends on the
getKind(). UsegetConstant()etc. to cast the data to the correct type.
-
getKind
ETokenKind getKind()
- Returns:
- The type of this token, such as whether it is a variable or an operator.
-
getOperator
TOperator getOperator()
- Returns:
- The operator if the kind of this token is
ETokenKind.OPERATOR.
-
getSourcePosition
ISourcePosition getSourcePosition()
- Returns:
- The starting position of this token in the source code.
-
getVariableName
String getVariableName()
- Returns:
- The variable name if the kind of this token is
ETokenKind.VARIABLE.
-
-