Package de.xima.fc.workflow.parser.infix
Interface IParsedElement<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 IParsedElement<TConstant extends IConstant,TOperator extends IOperator>
Represents a parsed element created when a token stream of an infix expression is parsed into reverse polnish notation.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TConstant
getConstant()
Object
getData()
EParsedElementKind
getKind()
TOperator
getOperator()
ISourcePosition
getSourcePosition()
String
getVariableName()
-
-
-
Method Detail
-
getConstant
TConstant getConstant()
- Returns:
- The constant if this token is of kind
EParsedElementKind.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
EParsedElementKind getKind()
- Returns:
- The kind of this element, such as whether it is an operator or variable.
-
getOperator
TOperator getOperator()
- Returns:
- The operator if this token is of kind
EParsedElementKind.OPERATOR_INFIX
,EParsedElementKind.OPERATOR_PREFIX
, orEParsedElementKind.OPERATOR_POSTFIX
.
-
getSourcePosition
ISourcePosition getSourcePosition()
- Returns:
- The position in the source code where this element appeared originally.
-
getVariableName
String getVariableName()
- Returns:
- The variable name if this token is of kind
EParsedElementKind.VARIABLE
.
-
-