Class JBBPOnlyFieldEvaluator
java.lang.Object
com.igormaznitsa.jbbp.compiler.varlen.JBBPOnlyFieldEvaluator
- All Implemented Interfaces:
JBBPIntegerValueEvaluator,Serializable
Class implements an evaluator which works with only field.
- Since:
- 1.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionJBBPOnlyFieldEvaluator(String externalFieldName, int namedFieldIndex) The Constructor. -
Method Summary
Modifier and TypeMethodDescriptioninteval(JBBPBitInputStream inStream, int currentCompiledBlockOffset, JBBPCompiledBlock block, JBBPNamedNumericFieldMap fieldMap) Calculate an integer value.toString()voidvisitItems(JBBPCompiledBlock block, int currentCompiledBlockOffset, ExpressionEvaluatorVisitor visitor) Visit all expression items
-
Constructor Details
-
JBBPOnlyFieldEvaluator
The Constructor.- Parameters:
externalFieldName- the external field name, it can be null.namedFieldIndex- the index of a named field in named field area.
-
-
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
-
toString
-
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
-