Package io.crums.util
Class ListExtension<T>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<T>
io.crums.util.ListExtension<T>
- All Implemented Interfaces:
java.lang.Iterable<T>
,java.util.Collection<T>
,java.util.List<T>
,java.util.RandomAccess
public class ListExtension<T>
extends java.util.AbstractList<T>
implements java.util.RandomAccess
A first list extended by a second. The present use case is when the first list is read-only,
but this class imposes no restrictions. This is just a serial view of 2 otherwise independent
lists.
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
Constructors Constructor Description ListExtension(java.util.List<T> first)
Creqte a new instance by extending the first list with an ArrayList.ListExtension(java.util.List<T> first, java.util.List<T> second)
Creates an instance composed of the given 2 lists. -
Method Summary
Methods inherited from class java.util.AbstractList
add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
Methods inherited from class java.util.AbstractCollection
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, 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.lang.Iterable
forEach
Methods inherited from interface java.util.List
contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
-
Constructor Details
-
ListExtension
Creqte a new instance by extending the first list with an ArrayList. -
ListExtension
Creates an instance composed of the given 2 lists.
-
-
Method Details