Class IntConstValueEvaluator
java.lang.Object
com.igormaznitsa.jbbp.compiler.conversion.IntConstValueEvaluator
- All Implemented Interfaces:
JBBPIntegerValueEvaluator,Serializable
Auxiliary class to process expression with only integer constant.
- Since:
- 1.3.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioninteval(JBBPBitInputStream inStream, int currentCompiledBlockOffset, JBBPCompiledBlock block, JBBPNamedNumericFieldMap fieldMap) Calculate an integer value.voidvisitItems(JBBPCompiledBlock block, int currentCompiledBlockOffset, ExpressionEvaluatorVisitor visitor) Visit all expression items
-
Method Details
-
eval
public int eval(JBBPBitInputStream inStream, int currentCompiledBlockOffset, JBBPCompiledBlock block, JBBPNamedNumericFieldMap fieldMap) Description copied from interface:JBBPIntegerValueEvaluatorCalculate an integer value.- Specified by:
evalin interfaceJBBPIntegerValueEvaluator- Parameters:
inStream- a bit input streamcurrentCompiledBlockOffset- the current offset in the compiled blockblock- a compiled script blockfieldMap- a named numeric field map- Returns:
- calculated value as integer
-
visitItems
public void visitItems(JBBPCompiledBlock block, int currentCompiledBlockOffset, ExpressionEvaluatorVisitor visitor) Description copied from interface:JBBPIntegerValueEvaluatorVisit all expression items- Specified by:
visitItemsin interfaceJBBPIntegerValueEvaluator- Parameters:
block- the compiled block contains value, must not be nullcurrentCompiledBlockOffset- the offset of the data in the compiled blockvisitor- the visitor to visit items, must not be null
-