public class LightweightOperatorCollection extends BaseOperatorCollection
Lightweight operator collection. Intended to be used in scenarios when underlying contents stream is not attached, where just operator collection is required as a result.
Constructor and Description |
---|
LightweightOperatorCollection()
Initialize object
|
LightweightOperatorCollection(com.aspose.pdf.engine.data.ITrailerable trailerable,
com.aspose.ms.System.Collections.Generic.List<Operator> operators)
For internal usage only!
|
LightweightOperatorCollection(OperatorCollection operatorCollection)
Initialize object
|
Modifier and Type | Method and Description |
---|---|
void |
add(Operator op)
Add operator
|
void |
addRange(LightweightOperatorCollection oc)
Add LightweightOperatorCollection
|
void |
cancelUpdate()
Cancels last update.
|
void |
clear()
Clears collection.
|
boolean |
contains(Operator item)
Check if the item is in collection.
|
void |
deleteUnrestricted(int index)
internal delete Unrestrictedelement
|
Operator |
get_Item(int index)
Gets operator by its index.
|
Operator |
getUnrestricted(int index)
For internal usage getUnrestricted operator
|
void |
insert(int index,
Operator op)
Insert operator
|
boolean |
isFastTextExtractionMode()
Indicates whether collection is limited to fast text extraction
|
boolean |
isReadOnly()
Gets a value indicating whether the collection is read-only.
|
Iterator<Operator> |
iterator()
Return iterator
|
boolean |
remove(Operator item)
Removes operator from collection.
|
void |
resumeUpdate()
Resumes document update.
|
void |
set_Item(int index,
Operator value)
Sets operator by its index.
|
int |
size()
Operators count
|
void |
suppressUpdate()
Suppresses update contents data.
|
com.aspose.ms.System.Collections.Generic.List<Operator> |
toList()
Returns operators list.
|
void |
updateData()
internal
|
isEmpty
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public LightweightOperatorCollection()
public LightweightOperatorCollection(com.aspose.pdf.engine.data.ITrailerable trailerable, com.aspose.ms.System.Collections.Generic.List<Operator> operators)
trailerable
- Internal objectoperators
- Internal objectpublic LightweightOperatorCollection(OperatorCollection operatorCollection)
operatorCollection
- OperatorCollection objectpublic Operator get_Item(int index)
Gets operator by its index.
Example demonstrates how to get operator of page contents by index. Document doc = new Document("input.pdf"); OperatorCollection oc = doc.getPages().get_Item(1).getContents(); Operator first = oc.get_Item(1);
get_Item
in class BaseOperatorCollection
index
- Index of operator. Numbering is starts from 1.public void set_Item(int index, Operator value)
Example demonstrates how to get operator of page contents by index. Document doc = new Document("input.pdf"); OperatorCollection oc = doc.getPages().get_Item(1).getContents(); Operator first = oc.get_Item(1);
set_Item
in class BaseOperatorCollection
index
- Index of operator. Numbering is starts from 1.value
- Operator from requested indexpublic Iterator<Operator> iterator()
iterator
in interface Iterable<Operator>
iterator
in class BaseOperatorCollection
IGenericEnumerator<Operator>
objectpublic int size()
size
in class BaseOperatorCollection
public boolean isFastTextExtractionMode()
Indicates whether collection is limited to fast text extraction
isFastTextExtractionMode
in class BaseOperatorCollection
public void suppressUpdate()
Suppresses update contents data. The contents stream is not updated until ResumeUpdate is called.
suppressUpdate
in class BaseOperatorCollection
public void resumeUpdate()
Resumes document update. Updates contents stream in case there are any pending changes.
resumeUpdate
in class BaseOperatorCollection
public void insert(int index, Operator op)
insert
in class BaseOperatorCollection
index
- int valueop
- Operator objectpublic void add(Operator op)
add
in class BaseOperatorCollection
op
- Operator objectpublic void addRange(LightweightOperatorCollection oc)
oc
- LightweightOperatorCollection instancepublic Operator getUnrestricted(int index)
getUnrestricted
in class BaseOperatorCollection
index
- int valuepublic void updateData()
updateData
in class BaseOperatorCollection
public void deleteUnrestricted(int index)
deleteUnrestricted
in class BaseOperatorCollection
index
- int valuepublic void cancelUpdate()
Cancels last update. This method may be called when the change should not raise contents update.
cancelUpdate
in class BaseOperatorCollection
public com.aspose.ms.System.Collections.Generic.List<Operator> toList()
Returns operators list.
toList
in class BaseOperatorCollection
public boolean remove(Operator item)
BaseOperatorCollection
Removes operator from collection.
remove
in class BaseOperatorCollection
item
- Operator instancepublic boolean contains(Operator item)
BaseOperatorCollection
Check if the item is in collection.
contains
in class BaseOperatorCollection
item
- Operator instancepublic void clear()
BaseOperatorCollection
Clears collection.
clear
in class BaseOperatorCollection
public boolean isReadOnly()
Gets a value indicating whether the collection is read-only.
isReadOnly
in class BaseOperatorCollection