T - Element typeprotected static class FlatLists.Flat1List<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 and cannot be modified or re-sized. The element may be null.
The list is created via FlatLists.of().
| 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(Object o) |
boolean |
containsAll(Collection<?> c) |
boolean |
equals(Object o) |
T |
get(int index) |
int |
hashCode() |
int |
indexOf(Object o) |
boolean |
isEmpty() |
Iterator<T> |
iterator() |
int |
lastIndexOf(Object o) |
ListIterator<E> |
listIterator() |
ListIterator<E> |
listIterator(int index) |
E |
remove(int index) |
boolean |
remove(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) |
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(Object o)
public int hashCode()
public int lastIndexOf(Object o)
lastIndexOf in interface List<T>public <T2> T2[] toArray(T2[] a)
public 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>@Nonnull 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(@Nonnull Collection<? extends E> c)
addAll in interface Collection<E>addAll in interface List<E>public boolean addAll(int index,
@Nonnull
Collection<? extends E> c)
public boolean removeAll(@Nonnull Collection<?> c)
removeAll in interface Collection<E>removeAll in interface List<E>public boolean retainAll(@Nonnull 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>@Nonnull public ListIterator<E> listIterator(int index)
listIterator in interface List<E>public boolean contains(Object o)
contains in interface Collection<E>contains in interface List<E>public boolean containsAll(@Nonnull Collection<?> c)
containsAll in interface Collection<E>containsAll in interface List<E>public boolean remove(Object o)
remove in interface Collection<E>remove in interface List<E>Copyright © 2012-2020 Apache Software Foundation. All Rights Reserved.