ReadOnlyCollectionBase
Inheritance: java.lang.Object, java.util.AbstractCollection, java.util.AbstractList, com.aspose.tasks.AbstractList
public abstract class ReadOnlyCollectionBase<T> extends AbstractList<T>
Represents a read-only collection of objects.
T : Type of collection items.
Methods
Method | Description |
---|---|
add(T item) | This is the stub implementation of ICollection’s Add method, that only throws UnsupportedOperationException |
add(int index, T element) | {@inheritDoc} |
clear() | {@inheritDoc} |
contains(Object o) | {@inheritDoc} |
get(int index) | Returns the element at the specified index. |
indexOf(Object o) | {@inheritDoc} |
isReadOnly() | Determines, if collection read-only. |
iterator() | Returns an enumerator for this collection. |
remove(int index) | {@inheritDoc} |
remove(Object o) | {@inheritDoc} |
set(int index, T value) | Returns the element at the specified index. |
size() | Gets the number of objects contained in the object. |
toList() | Converts the collection object to a list of VbaModule objects. |
add(T item)
public final boolean add(T item)
This is the stub implementation of ICollection’s Add method, that only throws UnsupportedOperationException
Parameters:
Parameter | Type | Description |
---|---|---|
item | T | The item to add. |
Returns: boolean
add(int index, T element)
public final void add(int index, T element)
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | {@inheritDoc} |
element | T | {@inheritDoc} |
clear()
public final void clear()
contains(Object o)
public final boolean contains(Object o)
Parameters:
Parameter | Type | Description |
---|---|---|
o | java.lang.Object | {@inheritDoc} |
Returns: boolean - {@inheritDoc}
get(int index)
public final T get(int index)
Returns the element at the specified index.
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | The zero-based index of the element to get. |
Returns: T - the element at the specified index.
indexOf(Object o)
public final int indexOf(Object o)
Parameters:
Parameter | Type | Description |
---|---|---|
o | java.lang.Object | {@inheritDoc} |
Returns: int - {@inheritDoc}
isReadOnly()
public final boolean isReadOnly()
Determines, if collection read-only.
Returns: boolean - true if collection read-only; false otherwise.
iterator()
public final Iterator<T> iterator()
Returns an enumerator for this collection.
Returns: java.util.Iterator<T> - An enumerator for this collection.
remove(int index)
public final T remove(int index)
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | {@inheritDoc} |
Returns: T - {@inheritDoc}
remove(Object o)
public final boolean remove(Object o)
Parameters:
Parameter | Type | Description |
---|---|---|
o | java.lang.Object | {@inheritDoc} |
Returns: boolean - {@inheritDoc}
set(int index, T value)
public final T set(int index, T value)
Returns the element at the specified index.
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | The zero-based index of the element to get. |
value | T |
Returns: T - the element at the specified index.
size()
public final int size()
Gets the number of objects contained in the object.
Returns: int - the number of objects contained in the object.
toList()
public final List<T> toList()
Converts the collection object to a list of VbaModule objects.
Returns: java.util.List<T> - List of objects.