T - Element typeprotected static class FlatLists.Flat4List<T> extends FlatLists.AbstractFlatList<T> implements FlatLists.ComparableList<T>
ArrayList or
Arrays.asList(Object[]) there is
no array, only one piece of memory allocated, therefore is very compact
and cache and CPU efficient.
The list is read-only, cannot be modified or re-sized. The elements may be null.
The list is created via FlatLists.of(java.util.List).
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E t) |
void |
add(int index,
E element) |
boolean |
addAll(Collection<? extends E> c) |
boolean |
addAll(int index,
Collection<? extends E> c) |
List<T> |
append(T e)
Returns a list that consists of a this list's elements plus a given
element.
|
void |
clear() |
int |
compareTo(List o) |
boolean |
contains(@Nullable Object o) |
boolean |
containsAll(Collection<?> c) |
boolean |
equals(@Nullable Object o) |
T |
get(int index) |
int |
hashCode() |
int |
indexOf(@Nullable Object o) |
boolean |
isEmpty() |
Iterator<T> |
iterator() |
int |
lastIndexOf(@Nullable Object o) |
ListIterator<E> |
listIterator() |
ListIterator<E> |
listIterator(int index) |
E |
remove(int index) |
boolean |
remove(@Nullable Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
E |
set(int index,
E element) |
int |
size() |
List<E> |
subList(int fromIndex,
int toIndex) |
@PolyNull Object[] |
toArray() |
<T2> T2[] |
toArray(T2[] a) |
String |
toString() |
toListclone, finalize, getClass, notify, notifyAll, wait, wait, waitadd, add, addAll, addAll, clear, contains, containsAll, isEmpty, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, sort, spliterator, subListparallelStream, removeIf, streampublic int size()
public boolean equals(@Nullable Object o)
public int hashCode()
public int lastIndexOf(@Nullable Object o)
lastIndexOf in interface List<T>public <T2> T2[] toArray(T2[] a)
public @PolyNull Object[] toArray()
public int compareTo(List o)
compareTo in interface Comparable<List>public List<T> append(T e)
FlatLists.AbstractFlatListappend in class FlatLists.AbstractFlatList<T>public ListIterator<E> listIterator()
listIterator in interface List<E>public boolean isEmpty()
isEmpty in interface Collection<E>isEmpty in interface List<E>public boolean add(E t)
add in interface Collection<E>add in interface List<E>public boolean addAll(Collection<? extends E> c)
addAll in interface Collection<E>addAll in interface List<E>public boolean addAll(int index,
Collection<? extends E> c)
public boolean removeAll(Collection<?> c)
removeAll in interface Collection<E>removeAll in interface List<E>public boolean retainAll(Collection<?> c)
retainAll in interface Collection<E>retainAll in interface List<E>public void clear()
clear in interface Collection<E>clear in interface List<E>public ListIterator<E> listIterator(int index)
listIterator in interface List<E>public List<E> subList(int fromIndex, int toIndex)
public boolean contains(@Nullable Object o)
contains in interface Collection<E>contains in interface List<E>public boolean containsAll(Collection<?> c)
containsAll in interface Collection<E>containsAll in interface List<E>public boolean remove(@Nullable Object o)
remove in interface Collection<E>remove in interface List<E>Copyright © 2012-2022 Apache Software Foundation. All Rights Reserved.