Class ReadOnlyList<T>
java.lang.Object
com.strobel.core.ReadOnlyList<T>
- All Implemented Interfaces:
IReadOnlyList<T>, Iterable<T>, Collection<T>, List<T>, RandomAccess, SequencedCollection<T>
- Direct Known Subclasses:
MemberList, ParameterList
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final T[]private final intprivate final intprivate static final ReadOnlyList<?> private static final ReadOnlyList.ReadOnlyCollectionIterator<?> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateReadOnlyList(ReadOnlyList<T> baseList, int offset, int length) ReadOnlyList(Class<? extends T> elementType, Collection<? extends T> elements) ReadOnlyList(T... elements) ReadOnlyList(T[] elements, int offset, int length) -
Method Summary
Modifier and TypeMethodDescriptionfinal voidfinal booleanfinal booleanaddAll(int index, Collection<? extends T> c) final booleanaddAll(Collection<? extends T> c) final voidclear()final booleanbooleancontainsAll(Iterable<? extends T> c) final booleancontainsAll(Collection<?> c) static <T> ReadOnlyList<T> booleanfinal Tget(int index) protected final T[]protected final intinthashCode()final intfinal booleanisEmpty()iterator()final intfinal ListIterator<T> final ListIterator<T> listIterator(int index) protected ReadOnlyList<T> final Tremove(int index) final booleanfinal booleanremoveAll(Collection<?> c) final booleanretainAll(Collection<?> c) final Tfinal intsize()subList(int fromIndex, int toIndex) protected static voidsubListRangeCheck(int fromIndex, int toIndex, int size) final T[]toArray()final <U> U[]toArray(U[] a) toString()Methods inherited from interface Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface List
addFirst, addLast, getFirst, getLast, removeFirst, removeLast, replaceAll, reversed, sort, spliterator
-
Field Details
-
EMPTY
-
EMPTY_ITERATOR
-
_offset
private final int _offset -
_length
private final int _length -
_elements
-
-
Constructor Details
-
ReadOnlyList
-
ReadOnlyList
-
ReadOnlyList
-
ReadOnlyList
-
-
Method Details
-
emptyList
-
newInstance
-
getOffset
protected final int getOffset() -
getElements
-
size
public final int size()- Specified by:
sizein interfaceCollection<T>- Specified by:
sizein interfaceIReadOnlyList<T>- Specified by:
sizein interfaceList<T>
-
isEmpty
public final boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<T>- Specified by:
isEmptyin interfaceIReadOnlyList<T>- Specified by:
isEmptyin interfaceList<T>
-
containsAll
- Specified by:
containsAllin interfaceIReadOnlyList<T>
-
contains
- Specified by:
containsin interfaceCollection<T>- Specified by:
containsin interfaceIReadOnlyList<T>- Specified by:
containsin interfaceList<T>
-
iterator
-
toArray
-
toArray
-
add
-
remove
-
containsAll
- Specified by:
containsAllin interfaceCollection<T>- Specified by:
containsAllin interfaceList<T>
-
addAll
-
addAll
-
removeAll
-
retainAll
-
clear
-
get
-
set
-
add
-
remove
-
hashCode
-
equals
-
indexOf
-
lastIndexOf
- Specified by:
lastIndexOfin interfaceIReadOnlyList<T>- Specified by:
lastIndexOfin interfaceList<T>
-
toString
-
listIterator
- Specified by:
listIteratorin interfaceIReadOnlyList<T>- Specified by:
listIteratorin interfaceList<T>
-
listIterator
- Specified by:
listIteratorin interfaceIReadOnlyList<T>- Specified by:
listIteratorin interfaceList<T>
-
subListRangeCheck
protected static void subListRangeCheck(int fromIndex, int toIndex, int size) -
subList
-