Operator
Inheritance: java.lang.Object
public abstract class Operator
Abstract class representing operator.
Constructors
Constructor | Description |
---|---|
Operator(int index, ICommand command) | For internal usage only! |
Methods
Method | Description |
---|---|
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:
Parameter | Type | Description |
---|---|---|
index | int | Index of operator in operators list |
command | ICommand | Command 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:
Parameter | Type | Description |
---|---|---|
value | int | int 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:
Parameter | Type | Description |
---|---|---|
visitor | IOperatorSelector | Visitor 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:
Parameter | Type | Description |
---|---|---|
op | Operator | Operator 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:
Parameter | Type | Description |
---|---|---|
op | Operator | Operator 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:
Parameter | Type | Description |
---|---|---|
primitive | IPdfPrimitive | Primitive |
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:
Parameter | Type | Description |
---|---|---|
op | Operator | Operator object |
Returns: boolean - True if this is text output operator