Top Description Fields Constructors Methods
org.apache.pdfbox.pdmodel.common.function.type4

public Class ExecutionContext

extends Object
Class Inheritance
Imports
java.util.Stack

Makes up the execution context, holding the available operators and the execution stack.

Field Summary

Modifier and TypeField and Description
private final Operators
private final Stack<Object>

Constructor Summary

AccessConstructor and Description
public
ExecutionContext(Operators
the operator set
operatorSet
)

Creates a new execution context.

Method Summary

Modifier and TypeMethod and Description
public Operators

Returns:

the operator set
getOperators
()

Returns the operator set used by this execution context.

public Stack<Object>

Returns:

the stack
getStack
()

Returns the stack used by this execution context.

public int

Returns:

the int value
popInt
()

Pops a value of type int from the stack.

public Number

Returns:

the number
popNumber
()

Pops a number (int or real) from the stack.

public float

Returns:

the real value
popReal
()

Pops a number from the stack and returns it as a real value.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

operatorsback to summary
private final Operators operators
stackback to summary
private final Stack<Object> stack

Constructor Detail

ExecutionContextback to summary
public ExecutionContext(Operators operatorSet)

Creates a new execution context.

Parameters
operatorSet:Operators

the operator set

Method Detail

getOperatorsback to summary
public Operators getOperators()

Returns the operator set used by this execution context.

Returns:Operators

the operator set

getStackback to summary
public Stack<Object> getStack()

Returns the stack used by this execution context.

Returns:Stack<Object>

the stack

popIntback to summary
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:int

the int value

popNumberback to summary
public Number popNumber()

Pops a number (int or real) from the stack. If it's neither data type, a ClassCastException is thrown.

Returns:Number

the number

popRealback to summary
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:float

the real value