Class BigList.ReadOnlyBigList<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
org.magicwerk.brownies.collections.IList<E>
org.magicwerk.brownies.collections.BigList<E>
org.magicwerk.brownies.collections.BigList.ReadOnlyBigList<E>
- All Implemented Interfaces:
Serializable, Cloneable, Iterable<E>, Collection<E>, List<E>, RandomAccess, SequencedCollection<E>, ICollection<E>, IListable<E>
A read-only version of
Key1List.
It is used to implement both unmodifiable and immutable lists.
Note that the client cannot change the list, but the content may change if the underlying list is changed.- Author:
- Thomas Mauch
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class BigList
BigList.ReadOnlyBigList<E>Nested classes/interfaces inherited from class IList
IList.IListableFromArray<E>, IList.IListableFromCollection<E>, IList.IListableFromList<E>, IList.IListableFromMult<E> -
Field Summary
Fields inherited from class AbstractList
modCount -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedReadOnlyBigList(BigList<E> that) Private constructor used internally. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanHelper method for adding an element to the list.protected voiddoClear()protected voiddoModify()This method is called internally before elements are allocated or freed.protected EdoRemove(int index) Helper method to remove an element.protected voiddoRemoveAll(int index, int len) Remove specified range of elements from list.protected ESets an element at specified position.protected EHelper method for setting an element in the list.Methods inherited from class BigList
binarySearch, blockSize, capacity, clone, copy, create, create, create, crop, doAddAll, doAssign, doClone, doCreate, doEnsureCapacity, doGet, EMPTY, finalize, getDefaultElem, immutableList, isReadOnly, size, sort, spliterator, trimToSize, unmodifiableListMethods inherited from class IList
add, add, addAll, addAll, addAll, addAll, addArray, addArray, addArray, addArray, addFirst, addIfAbsent, addLast, addMult, addMult, asDeque, asIListable, binarySearch, checkIndex, checkIndexAdd, checkLength, checkLengths, checkNonNull, checkRange, clear, contains, containsAll, containsAny, containsIf, copy, count, countIf, descendingIterator, doCreateArray, doGetAll, doIndexOf, doIndexOfIf, doInitAll, doLastIndexOf, doLastIndexOfIf, doPutAll, doReplace, doRotate, drag, element, ensureCapacity, equals, extract, extractIf, fill, filter, filterMap, flatMap, get, getAll, getAll, getDistinct, getFirst, getFirstOrNull, getIf, getLast, getLastOrNull, getSingle, getSingleOrNull, hashCode, indexOf, indexOf, indexOfIf, indexOfIf, initAll, initAll, initArray, initMult, isEmpty, iterator, lastIndexOf, lastIndexOf, lastIndexOfIf, lastIndexOfIf, listIterator, listIterator, map, mapFilter, move, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, put, putAll, putAll, putArray, putMult, remove, remove, remove, remove, removeAll, removeAll, removeAll, removeFirst, removeFirstOccurrence, removeIf, removeLast, removeLastOccurrence, replace, replaceAll, replaceAll, replaceArray, replaceMult, resize, retain, retainAll, retainAll, retainIf, reverse, reverse, rotate, rotate, set, setAll, setAll, setArray, setArray, setMult, sort, swap, toArray, toArray, toArray, toArray, toArray, toArray, toString, transferCopy, transferMove, transferRemove, transferSwap, transform, transformedListMethods inherited from class AbstractList
removeRange, subListMethods inherited from interface Collection
parallelStream, stream, toArrayMethods inherited from interface List
replaceAll, reversed, subList
-
Constructor Details
-
ReadOnlyBigList
-
-
Method Details
-
doAdd
Description copied from class:IListHelper method for adding an element to the list. This is the only method which really adds an element. Override if you need to validity checks before adding. -
doSet
Description copied from class:IListHelper method for setting an element in the list. This is the only method which really sets an element. Override if you need to validity checks before setting. -
doReSet
Description copied from class:IListSets an element at specified position. This method is used internally if existing elements will be moved etc. Override if you need to validity checks. -
doRemove
Description copied from class:IListHelper method to remove an element. This is the only method which really removes an element. Override if you need to validity checks before removing. -
doRemoveAll
protected void doRemoveAll(int index, int len) Description copied from class:IListRemove specified range of elements from list.- Overrides:
doRemoveAllin classBigList<E>- Parameters:
index- index of first element to removelen- number of elements to remove
-
doClear
-
doModify
-