public final class TextFragmentCollection extends Object implements Iterable<TextFragment>
Represents a text fragments collection
Modifier and Type | Method and Description |
---|---|
void |
add(TextFragment fragment)
Adds the text fragment element at the specified index.
|
void |
clear()
Clears all items from the collection.
|
boolean |
contains(TextFragment item)
Determines whether the collection contains a specific value.
|
void |
copyTo(TextFragment[] array,
int index)
Copies the entire collection to a compatible one-dimensional Array, starting at the specified
index of the target array
|
TextFragment |
get_Item(int index)
Gets the text fragment 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<TextFragment> |
iterator()
Returns an enumerator for the entire collection.
|
boolean |
remove(TextFragment item)
Deletes specified item from collection.
|
int |
size()
Gets the number of
TextFragment 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 TextFragment
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(TextFragment fragment)
Adds the text fragment element at the specified index.
fragment
- TextFragment objectpublic Iterator<TextFragment> iterator()
Returns an enumerator for the entire collection.
iterator
in interface Iterable<TextFragment>
public void copyTo(TextFragment[] 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 void clear()
Clears all items from the collection.
public boolean contains(TextFragment item)
Determines whether the collection contains a specific value.
item
- The object to locate in the collectionpublic boolean remove(TextFragment item)
Deletes specified item from collection.
item
- The object to deletepublic TextFragment get_Item(int index)
Gets the text fragment element at the specified index.
Index should be in the range [1..n] where n equals to the text fragments count.index
- Index within the collection.