TextSegmentCollection
Inheritance: java.lang.Object
All Implemented Interfaces: java.lang.Iterable
public final class TextSegmentCollection implements Iterable<TextSegment>
Represents a text segments collection
Methods
Method | Description |
---|---|
size() | Gets the number of TextSegment object elements actually contained in the collection. |
getSyncRoot() | Gets an object that can be used to synchronize access to the collection. |
isSynchronized() | Gets a value indicating whether access to the collection is synchronized (thread safe). |
isReadOnly() | Gets a value indicating whether collection is read-only |
add(TextSegment segment) | Adds the text segment element at the specified index. |
delete(int index) | Deletes the text segment element at the specified index. |
iterator() | Returns an enumerator for the entire collection. |
copyTo(TextSegment[] array, int index) | Copies the entire collection to a compatible one-dimensional Array, starting at the specified index of the target array |
get_Item(int index) | Gets the text segment element at the specified index. |
clear() | Clears all items from the collection. |
contains(TextSegment item) | Determines whether the collection contains a specific value. |
remove(TextSegment item) | Deletes specified item from collection. |
size()
public int size()
Gets the number of TextSegment object elements actually contained in the collection.
Returns: int - int value
getSyncRoot()
public Object getSyncRoot()
Gets an object that can be used to synchronize access to the collection.
Returns: java.lang.Object - Object element
isSynchronized()
public boolean isSynchronized()
Gets a value indicating whether access to the collection is synchronized (thread safe).
Returns: boolean - boolean value
isReadOnly()
public boolean isReadOnly()
Gets a value indicating whether collection is read-only
Returns: boolean - boolean value
add(TextSegment segment)
public void add(TextSegment segment)
Adds the text segment element at the specified index.
Parameters:
Parameter | Type | Description |
---|---|---|
segment | TextSegment | Text segment object |
delete(int index)
public void delete(int index)
Deletes the text segment element at the specified index.
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | int value |
iterator()
public Iterator<TextSegment> iterator()
Returns an enumerator for the entire collection.
Returns: java.util.Iterator<com.aspose.pdf.TextSegment> - Enumerator object.
copyTo(TextSegment[] array, int index)
public void copyTo(TextSegment[] array, int index)
Copies the entire collection to a compatible one-dimensional Array, starting at the specified index of the target array
Parameters:
Parameter | Type | Description |
---|---|---|
array | TextSegment[] | Array of objects which will be copied. |
index | int | Starting index from which copying will be started. |
get_Item(int index)
public TextSegment get_Item(int index)
Gets the text segment element at the specified index.
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | Index within the collection. |
Returns: TextSegment - TextSegment object.
clear()
public void clear()
Clears all items from the collection.
contains(TextSegment item)
public boolean contains(TextSegment item)
Determines whether the collection contains a specific value.
Parameters:
Parameter | Type | Description |
---|---|---|
item | TextSegment | The object to locate in the collection |
Returns: boolean - true if item is found in the collection; otherwise, false.
remove(TextSegment item)
public boolean remove(TextSegment item)
Deletes specified item from collection.
Parameters:
Parameter | Type | Description |
---|---|---|
item | TextSegment | The object to delete |
Returns: boolean - true if item was deleted from collection; otherwise, false.