Class ExecutionContext
java.lang.Object
org.apache.pdfbox.pdmodel.common.function.type4.ExecutionContext
Makes up the execution context, holding the available operators and the execution stack.
- Version:
- $Revision$
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the operator set used by this execution context.getStack()
Returns the stack used by this execution context.int
popInt()
Pops a value of type int from the stack.Pops a number (int or real) from the stack.float
popReal()
Pops a number from the stack and returns it as a real value.
-
Constructor Details
-
ExecutionContext
Creates a new execution context.- Parameters:
operatorSet
- the operator set
-
-
Method Details
-
getStack
Returns the stack used by this execution context.- Returns:
- the stack
-
getOperators
Returns the operator set used by this execution context.- Returns:
- the operator set
-
popNumber
Pops a number (int or real) from the stack. If it's neither data type, a ClassCastException is thrown.- Returns:
- the number
-
popInt
public int popInt()Pops a value of type int from the stack. If the value is not of type int, a ClassCastException is thrown.- Returns:
- the int value
-
popReal
public float popReal()Pops a number from the stack and returns it as a real value. If the value is not of a numeric type, a ClassCastException is thrown.- Returns:
- the real value
-