T
- List typepublic final class ListOf<T> extends CollectionEnvelope<T>
List
.
This class should be used very carefully. You must understand that
it will fetch the entire content of the encapsulated List
on each
method call. It doesn't cache the data anyhow. If you don't
need this List
to re-fresh its content on every call,
by doing round-trips to the encapsulated iterable, decorate it with
Sticky
.
There is no thread-safety guarantee.
Sticky
Constructor and Description |
---|
ListOf(Iterable<T> src)
Ctor.
|
ListOf(Iterator<T> src)
Ctor.
|
ListOf(T... array)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
T element) |
boolean |
addAll(int index,
Collection<? extends T> items) |
T |
get(int index) |
int |
indexOf(Object item) |
int |
lastIndexOf(Object item) |
ListIterator<T> |
listIterator() |
ListIterator<T> |
listIterator(int index) |
T |
remove(int index) |
T |
set(int index,
T element) |
List<T> |
subList(int start,
int end) |
String |
toString() |
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, replaceAll, retainAll, size, sort, spliterator, toArray, toArray
parallelStream, removeIf, stream
@SafeVarargs public ListOf(T... array)
array
- An array of some elementspublic final boolean addAll(int index, Collection<? extends T> items)
public final int lastIndexOf(Object item)
lastIndexOf
in interface List<T>
public final ListIterator<T> listIterator()
listIterator
in interface List<T>
public final ListIterator<T> listIterator(int index)
listIterator
in interface List<T>
public String toString()
toString
in class CollectionEnvelope<T>
Copyright © 2017–2019 Cactoos. All rights reserved.