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
|
isEmptyequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic 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 BaseOperatorCollectionindex - 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 BaseOperatorCollectionindex - Index of operator. Numbering is starts from 1.value - Operator from requested indexpublic Iterator<Operator> iterator()
iterator in interface Iterable<Operator>iterator in class BaseOperatorCollectionIGenericEnumerator<Operator> objectpublic int size()
size in class BaseOperatorCollectionpublic boolean isFastTextExtractionMode()
Indicates whether collection is limited to fast text extraction
isFastTextExtractionMode in class BaseOperatorCollectionpublic void suppressUpdate()
Suppresses update contents data. The contents stream is not updated until ResumeUpdate is called.
suppressUpdate in class BaseOperatorCollectionpublic void resumeUpdate()
Resumes document update. Updates contents stream in case there are any pending changes.
resumeUpdate in class BaseOperatorCollectionpublic void insert(int index,
Operator op)
insert in class BaseOperatorCollectionindex - int valueop - Operator objectpublic void add(Operator op)
add in class BaseOperatorCollectionop - Operator objectpublic void addRange(LightweightOperatorCollection oc)
oc - LightweightOperatorCollection instancepublic Operator getUnrestricted(int index)
getUnrestricted in class BaseOperatorCollectionindex - int valuepublic void updateData()
updateData in class BaseOperatorCollectionpublic void deleteUnrestricted(int index)
deleteUnrestricted in class BaseOperatorCollectionindex - int valuepublic void cancelUpdate()
Cancels last update. This method may be called when the change should not raise contents update.
cancelUpdate in class BaseOperatorCollectionpublic com.aspose.ms.System.Collections.Generic.List<Operator> toList()
Returns operators list.
toList in class BaseOperatorCollectionpublic boolean remove(Operator item)
BaseOperatorCollectionRemoves operator from collection.
remove in class BaseOperatorCollectionitem - Operator instancepublic boolean contains(Operator item)
BaseOperatorCollectionCheck if the item is in collection.
contains in class BaseOperatorCollectionitem - Operator instancepublic void clear()
BaseOperatorCollectionClears collection.
clear in class BaseOperatorCollectionpublic boolean isReadOnly()
Gets a value indicating whether the collection is read-only.
isReadOnly in class BaseOperatorCollectionCopyright © 2025 Aspose. All Rights Reserved.