Package eu.bandm.tools.umod.runtime
Class CheckedList<T>
java.lang.Object
eu.bandm.tools.umod.runtime.CheckedList<T>
- All Implemented Interfaces:
Serializable,Iterable<T>,Collection<T>,List<T>,SequencedCollection<T>
- Direct Known Subclasses:
CheckedListPlus
Implements a List which is strict in all its elements.
The implementation is done by delegation to some peer object from a
predefined java runtime class. The kind of implementation (linked list or
array list) can be selected by a parameter to the constructor.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassstatic enum -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionUses an LinkedList.CheckedList(int capacity) Uses an ArrayList.CheckedList(CheckedList.implementations implementation) CheckedList(CheckedList.implementations implementation, List<? extends T> prototype) CheckedList(CheckedList.implementations implementation, T... data) CheckedList(List<? extends T> prototype) Uses an ArrayList.CheckedList(T... data) -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanaddAll(int index, Collection<? extends T> c) booleanaddAll(Collection<? extends T> c) voidclear()booleanbooleancontainsAll(Collection<?> c) booleanget(int index) inthashCode()intbooleanisEmpty()iterator()intlistIterator(int index) remove(int index) booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) static <T> CheckedList<T> singleton(T x) intsize()subList(int fromIndex, int toIndex) Object[]toArray()<T1> T1[]toArray(T1[] a) toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
addFirst, addLast, getFirst, getLast, removeFirst, removeLast, replaceAll, reversed, sort, spliterator
-
Field Details
-
peer
-
-
Constructor Details
-
CheckedList
public CheckedList()Uses an LinkedList. -
CheckedList
public CheckedList(int capacity) Uses an ArrayList. -
CheckedList
-
CheckedList
-
CheckedList
Uses an ArrayList. -
CheckedList
-
CheckedList
-
-
Method Details
-
toString
-
add
-
add
-
addAll
-
addAll
-
clear
public void clear() -
contains
-
containsAll
- Specified by:
containsAllin interfaceCollection<T>- Specified by:
containsAllin interfaceList<T>
-
equals
-
get
-
hashCode
public int hashCode() -
indexOf
-
isEmpty
public boolean isEmpty() -
iterator
-
lastIndexOf
- Specified by:
lastIndexOfin interfaceList<T>
-
listIterator
- Specified by:
listIteratorin interfaceList<T>
-
listIterator
- Specified by:
listIteratorin interfaceList<T>
-
remove
-
remove
-
removeAll
-
retainAll
-
set
-
size
public int size() -
subList
-
toArray
-
toArray
public <T1> T1[] toArray(T1[] a) -
singleton
-