OperatorCollection

OperatorCollection

Overview

OperatorCollection is a class in Aspose.Pdf FOSS for Java. Inherits from: Iterable<Operator>.

Represents a sequence of operators from a PDF content stream.

Properties

NameTypeAccessDescription
allList<Operator>ReadReturns an unmodifiable view of all operators.

Methods

SignatureDescription
OperatorCollection(operators: List<Operator>)Creates a collection from an existing list of operators.
OperatorCollection()Creates an empty operator collection.
size()intReturns the number of operators in this collection.
get(index: int)OperatorReturns the operator at the given 1-based position
(Aspose-style indexing — {@code ops.get(1)} is the first operator).
getAt(index: int)OperatorReturns the operator at the given 0-based position.
setAt(index: int, op: Operator)Engine-side 0-based setter; pair with {@link #getAt(int)}.
removeAt(index: int)Engine-side 0-based remove; pair with {@link #getAt(int)}.
addAt(index: int, op: Operator)Engine-side 0-based insert; pair with {@link #getAt(int)}.
add(op: Operator)Appends an operator to the end of this collection.
add(other: java.util.Collection<? extends Operator>)Appends every operator from {@code other} to this collection.
set(index: int, op: Operator)Replaces the operator at the specified 1-based index.
insert(index: int, op: Operator)Inserts an operator at the specified 1-based index.
delete(index: int)Removes the operator at the specified 1-based index.
clear()Removes every operator from this collection.
iterator()Iterator<Operator>Returns an iterator over the operators.
getAll()List<Operator>Returns an unmodifiable view of all operators.
toString()StringReturns a string representation of all operators, one per line.

See Also