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 void
add(int index, T element)
boolean
add(T item)
This is the stub implementation of ICollection's Add method, that only throws UnsupportedOperationExceptionvoid
clear()
boolean
contains(Object o)
T
get(int index)
Returns the element at the specified index.int
indexOf(Object o)
boolean
isReadOnly()
Determines, if collection read-only.Iterator<T>
iterator()
Returns an enumerator for this collection.T
remove(int index)
boolean
remove(Object o)
T
set(int index, T value)
Returns the element at the specified index.int
size()
Gets the number of objects contained in the object.void
sort(Comparator<? super T> c)
List<T>
toList()
Converts the collection object to a list ofVbaModule
objects.-
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:
add
in interfaceCollection<T>
- Specified by:
add
in interfaceList<T>
- Overrides:
add
in classAbstractList<T>
- Parameters:
item
- The item to add.
-
clear
public final void clear()
- Specified by:
clear
in interfaceCollection<T>
- Specified by:
clear
in interfaceList<T>
- Overrides:
clear
in classAbstractList<T>
-
contains
public final boolean contains(Object o)
- Specified by:
contains
in interfaceCollection<T>
- Specified by:
contains
in interfaceList<T>
- Overrides:
contains
in 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:
remove
in interfaceCollection<T>
- Specified by:
remove
in interfaceList<T>
- Overrides:
remove
in 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:
size
in interfaceCollection<T>
- Specified by:
size
in interfaceList<T>
- Specified by:
size
in 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
VbaModule
objects.- Returns:
- List of objects.
-
sort
public void sort(Comparator<? super T> c)
- Parameters:
c
-
-
-