public final class TextSegmentCollection extends Object implements Iterable<TextSegment>
Represents a text segments collection
Modifier and Type | Method and Description |
---|---|
void |
add(TextSegment segment)
Adds the text segment element at the specified index.
|
void |
clear()
Clears all items from the collection.
|
boolean |
contains(TextSegment item)
Determines whether the collection contains a specific value.
|
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
|
void |
delete(int index)
Deletes the text segment element at the specified index.
|
TextSegment |
get_Item(int index)
Gets the text segment element at the specified index.
|
Object |
getSyncRoot()
Gets an object that can be used to synchronize access to the collection.
|
boolean |
isReadOnly()
Gets a value indicating whether collection is read-only
|
boolean |
isSynchronized()
Gets a value indicating whether access to the collection is synchronized (thread safe).
|
Iterator<TextSegment> |
iterator()
Returns an enumerator for the entire collection.
|
boolean |
remove(TextSegment item)
Deletes specified item from collection.
|
int |
size()
Gets the number of
TextSegment object elements actually contained in the collection. |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public int size()
Gets the number of TextSegment
object elements actually contained in the collection.
public Object getSyncRoot()
Gets an object that can be used to synchronize access to the collection.
public boolean isSynchronized()
Gets a value indicating whether access to the collection is synchronized (thread safe).
public boolean isReadOnly()
Gets a value indicating whether collection is read-only
public void add(TextSegment segment)
Adds the text segment element at the specified index.
segment
- Text segment objectpublic void delete(int index)
Deletes the text segment element at the specified index.
index
- int valuepublic Iterator<TextSegment> iterator()
Returns an enumerator for the entire collection.
iterator
in interface Iterable<TextSegment>
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
array
- Array of objects which will be copied.index
- Starting index from which copying will be started.public TextSegment get_Item(int index)
Gets the text segment element at the specified index.
index
- Index within the collection.public void clear()
Clears all items from the collection.
public boolean contains(TextSegment item)
Determines whether the collection contains a specific value.
item
- The object to locate in the collectionpublic boolean remove(TextSegment item)
Deletes specified item from collection.
item
- The object to delete