public class LightweightOperatorCollection extends BaseOperatorCollection implements com.aspose.ms.System.Collections.ICollection
Ligntweight 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() |
LightweightOperatorCollection(OperatorCollection operatorCollection) |
Modifier and Type | Method and Description |
---|---|
void |
add(Operator op)
Adds new operator into collection.
|
void |
cancelUpdate()
Cancels last update.
|
void |
copyTo(com.aspose.ms.System.Array array,
int index)
Copies operators into operators list.
|
void |
deleteUnrestricted(int index)
internal
|
Operator |
get_Item(int index)
Gets operator by its index.
|
Object |
getSyncRoot()
Gets synchronization object.
|
Operator |
getUnrestricted(int index)
internal
|
void |
insert(int index,
Operator op)
Inserts operator into collection.
|
boolean |
isSynchronized()
Returns true if object is synchronized.
|
com.aspose.ms.System.Collections.IEnumerator |
iterator()
Returns enumerator for collection
|
void |
resumeUpdate()
Resumes document update.
|
void |
set_Item(int index,
Operator value) |
int |
size()
Gets count of operators in the collection.
|
void |
suppressUpdate()
Suppresses update contents data.
|
void |
updateData()
internal
|
public LightweightOperatorCollection()
public LightweightOperatorCollection(OperatorCollection operatorCollection)
public 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)
set_Item
in class BaseOperatorCollection
public com.aspose.ms.System.Collections.IEnumerator iterator()
BaseOperatorCollection
Returns enumerator for collection
iterator
in interface com.aspose.ms.System.Collections.IEnumerable
iterator
in interface Iterable
iterator
in class BaseOperatorCollection
public void copyTo(com.aspose.ms.System.Array array, int index)
BaseOperatorCollection
Copies operators into operators list.
copyTo
in interface com.aspose.ms.System.Collections.ICollection
copyTo
in class BaseOperatorCollection
array
- Array with operators which must to be copied. This array must be Object[] or Operator[].index
- Starting index from which operators will be copiedpublic int size()
BaseOperatorCollection
Gets count of operators in the collection.
size
in interface com.aspose.ms.System.Collections.ICollection
size
in class BaseOperatorCollection
public Object getSyncRoot()
BaseOperatorCollection
Gets synchronization object.
getSyncRoot
in interface com.aspose.ms.System.Collections.ICollection
getSyncRoot
in class BaseOperatorCollection
public boolean isSynchronized()
BaseOperatorCollection
Returns true if object is synchronized.
isSynchronized
in interface com.aspose.ms.System.Collections.ICollection
isSynchronized
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)
BaseOperatorCollection
Inserts operator into collection.
insert
in class BaseOperatorCollection
index
- Index where new operator must be addedop
- Operator which will be instertedpublic void add(Operator op)
BaseOperatorCollection
Adds new operator into collection.
add
in class BaseOperatorCollection
op
- Operator which must be addedpublic Operator getUnrestricted(int index)
getUnrestricted
in class BaseOperatorCollection
public void updateData()
updateData
in class BaseOperatorCollection
public void deleteUnrestricted(int index)
deleteUnrestricted
in class BaseOperatorCollection
public void cancelUpdate()
Cancels last update. This method may be called when the change should not raise contents update.
cancelUpdate
in class BaseOperatorCollection
Copyright © 2014 Aspose. All Rights Reserved.