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

MethodDescription
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:

ParameterTypeDescription
itemTThe item to add.

Returns: boolean

add(int index, T element)

public final void add(int index, T element)

Parameters:

ParameterTypeDescription
indexint{@inheritDoc}
elementT{@inheritDoc}

clear()

public final void clear()

contains(Object o)

public final boolean contains(Object o)

Parameters:

ParameterTypeDescription
ojava.lang.Object{@inheritDoc}

Returns: boolean - {@inheritDoc}

get(int index)

public final T get(int index)

Returns the element at the specified index.

Parameters:

ParameterTypeDescription
indexintThe 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:

ParameterTypeDescription
ojava.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:

ParameterTypeDescription
indexint{@inheritDoc}

Returns: T - {@inheritDoc}

remove(Object o)

public final boolean remove(Object o)

Parameters:

ParameterTypeDescription
ojava.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:

ParameterTypeDescription
indexintThe zero-based index of the element to get.
valueT

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.