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 |
---|---|
java.util.List<T> |
append(T e)
Returns a list that consists of a this list's elements plus a given
element.
|
int |
compareTo(java.util.List o) |
boolean |
equals(java.lang.Object o) |
T |
get(int index) |
int |
hashCode() |
int |
indexOf(java.lang.Object o) |
java.util.Iterator<T> |
iterator() |
int |
lastIndexOf(java.lang.Object o) |
int |
size() |
java.lang.Object[] |
toArray() |
<T2> T2[] |
toArray(T2[] a) |
java.lang.String |
toString() |
toList
add, add, addAll, addAll, clear, contains, containsAll, isEmpty, listIterator, listIterator, remove, remove, removeAll, retainAll, set, subList
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
private final T t0
Flat1List(T t0)
public java.lang.String toString()
toString
in class java.lang.Object
public int size()
public java.util.Iterator<T> iterator()
public boolean equals(java.lang.Object o)
public int hashCode()
public int indexOf(java.lang.Object o)
indexOf
in interface java.util.List<T>
public int lastIndexOf(java.lang.Object o)
lastIndexOf
in interface java.util.List<T>
public <T2> T2[] toArray(T2[] a)
public java.lang.Object[] toArray()
public int compareTo(java.util.List o)
compareTo
in interface java.lang.Comparable<java.util.List>
public java.util.List<T> append(T e)
FlatLists.AbstractFlatList
append
in class FlatLists.AbstractFlatList<T>
Copyright © 2012–2019 The Apache Software Foundation. All rights reserved.