Package com.aspose.tasks
Class ReadOnlyCollectionBase<T>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<T>
-
- com.aspose.tasks.ReadOnlyCollectionBase<T>
-
- All Implemented Interfaces:
Iterable<T>,Collection<T>,List<T>
- Direct Known Subclasses:
ResourceUsageViewFieldCollection,TaskUsageViewFieldCollection,VbaModuleAttributeCollection,VbaModuleCollection,VbaReferenceCollection
public abstract class ReadOnlyCollectionBase<T> extends AbstractList<T>
Represents a read-only collection of objects.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int index, T element)booleanadd(T item)This is the stub implementation of ICollection's Add method, that only throws UnsupportedOperationExceptionvoidclear()booleancontains(Object o)Tget(int index)Returns the element at the specified index.intindexOf(Object o)booleanisReadOnly()Determines, if collection read-only.Iterator<T>iterator()Returns an enumerator for this collection.Tremove(int index)booleanremove(Object o)Tset(int index, T value)Returns the element at the specified index.intsize()Gets the number of objects contained in the object.voidsort(Comparator<? super T> c)List<T>toList()Converts the collection object to a list ofVbaModuleobjects.-
Methods inherited from class java.util.AbstractList
addAll, equals, hashCode, lastIndexOf, listIterator, listIterator, subList
-
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toString
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
addAll, containsAll, isEmpty, removeAll, replaceAll, retainAll, spliterator, toArray, toArray
-
-
-
-
Method Detail
-
add
public final boolean add(T item)
This is the stub implementation of ICollection's Add method, that only throws UnsupportedOperationException
- Specified by:
addin interfaceCollection<T>- Specified by:
addin interfaceList<T>- Overrides:
addin classAbstractList<T>- Parameters:
item- The item to add.
-
clear
public final void clear()
- Specified by:
clearin interfaceCollection<T>- Specified by:
clearin interfaceList<T>- Overrides:
clearin classAbstractList<T>
-
contains
public final boolean contains(Object o)
- Specified by:
containsin interfaceCollection<T>- Specified by:
containsin interfaceList<T>- Overrides:
containsin classAbstractCollection<T>- Parameters:
o-- Returns:
-
get
public final T get(int index)
Returns the element at the specified index.
-
indexOf
public final int indexOf(Object o)
-
add
public final void add(int index, T element)
-
isReadOnly
public final boolean isReadOnly()
Determines, if collection read-only.- Returns:
- true if collection read-only; false otherwise.
-
remove
public final boolean remove(Object o)
- Specified by:
removein interfaceCollection<T>- Specified by:
removein interfaceList<T>- Overrides:
removein classAbstractCollection<T>- Parameters:
o-- Returns:
-
remove
public final T remove(int index)
-
size
public final int size()
Gets the number of objects contained in the object.
- Specified by:
sizein interfaceCollection<T>- Specified by:
sizein interfaceList<T>- Specified by:
sizein classAbstractCollection<T>- Returns:
- the number of objects contained in the object.
-
toList
public final List<T> toList()
Converts the collection object to a list of
VbaModuleobjects.- Returns:
- List of objects.
-
sort
public void sort(Comparator<? super T> c)
- Parameters:
c-
-
-