Operator

Inheritance: java.lang.Object

public abstract class Operator

Abstract class representing operator.

Constructors

ConstructorDescription
Operator(int index, ICommand command)For internal usage only!

Methods

MethodDescription
getIndex()Get Operator index in page operators list.
setIndex(int value)Set Operator index in page operators list.
getCommandName()Gets operator name.
getParameters()Gets array of operator parameters.
getCommand()Gets command
reset()For internal usage only
accept(IOperatorSelector visitor)Accepts visitor IOperatorSelector which provides operators processing.
toString()Translates command and parameters into string representation.
valueEquals(Operator op)Compares this instance with the given object.
equals(Operator op)Compares this instance with the given object.
toString(IPdfPrimitive primitive)Returns text representation of Pdf primitive (string, array, dictionary etc.) according to PDF specification.
isTextShowOperator(Operator op)Determines if the operator is operator which responsible for text output (Tj, TJ, etc)

Operator(int index, ICommand command)

public Operator(int index, ICommand command)

For internal usage only!

Constructor of Operators. Creates operator by command object and operator index.

Parameters:

ParameterTypeDescription
indexintIndex of operator in operators list
commandICommandCommand object of operator

getIndex()

public int getIndex()

Get Operator index in page operators list.

Returns: int - int value

setIndex(int value)

public void setIndex(int value)

Set Operator index in page operators list.

Parameters:

ParameterTypeDescription
valueintint value

getCommandName()

public String getCommandName()

Gets operator name.

Returns: java.lang.String - String value

getParameters()

public ArrayList<CommandParameter> getParameters()

Gets array of operator parameters.

Returns: java.util.ArrayList<com.aspose.pdf.engine.commondata.pagecontent.operators.commands.CommandParameter> - ArrayList of CommandParameter value

getCommand()

public ICommand getCommand()

Gets command

Returns: ICommand - ICommand object

reset()

public void reset()

For internal usage only

accept(IOperatorSelector visitor)

public abstract void accept(IOperatorSelector visitor)

Accepts visitor IOperatorSelector which provides operators processing.

Parameters:

ParameterTypeDescription
visitorIOperatorSelectorVisitor object

toString()

public String toString()

Translates command and parameters into string representation.

Returns: java.lang.String - Operator text

valueEquals(Operator op)

public final boolean valueEquals(Operator op)

Compares this instance with the given object.

Parameters:

ParameterTypeDescription
opOperatorOperator to compare.

Returns: boolean - True if objects are equal, otherwise false.

equals(Operator op)

public final boolean equals(Operator op)

Compares this instance with the given object.

Parameters:

ParameterTypeDescription
opOperatorOperator instance

Returns: boolean - boolean value

toString(IPdfPrimitive primitive)

public static String toString(IPdfPrimitive primitive)

Returns text representation of Pdf primitive (string, array, dictionary etc.) according to PDF specification.

Parameters:

ParameterTypeDescription
primitiveIPdfPrimitivePrimitive

Returns: java.lang.String - Text represetation of the primitive

isTextShowOperator(Operator op)

public static boolean isTextShowOperator(Operator op)

Determines if the operator is operator which responsible for text output (Tj, TJ, etc)

Parameters:

ParameterTypeDescription
opOperatorOperator object

Returns: boolean - True if this is text output operator