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>
- 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
Modifier and TypeClassDescriptionclass
static enum
-
Field Summary
-
Constructor Summary
ConstructorDescriptionUses 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 TypeMethodDescriptionvoid
boolean
boolean
addAll
(int index, Collection<? extends T> c) boolean
addAll
(Collection<? extends T> c) void
clear()
boolean
boolean
containsAll
(Collection<?> c) boolean
get
(int index) int
hashCode()
int
boolean
isEmpty()
iterator()
int
listIterator
(int index) remove
(int index) boolean
boolean
removeAll
(Collection<?> c) boolean
retainAll
(Collection<?> c) static <T> CheckedList<T>
singleton
(T x) int
size()
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, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
replaceAll, 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:
containsAll
in interfaceCollection<T>
- Specified by:
containsAll
in interfaceList<T>
-
equals
-
get
-
hashCode
public int hashCode() -
indexOf
-
isEmpty
public boolean isEmpty() -
iterator
-
lastIndexOf
- Specified by:
lastIndexOf
in interfaceList<T>
-
listIterator
- Specified by:
listIterator
in interfaceList<T>
-
listIterator
- Specified by:
listIterator
in interfaceList<T>
-
remove
-
remove
-
removeAll
-
retainAll
-
set
-
size
public int size() -
subList
-
toArray
-
toArray
public <T1> T1[] toArray(T1[] a) -
singleton
-