public class ImmutableIntList extends FlatLists.AbstractFlatList<Integer>
Integer values backed by an array of
ints.| 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) |
ImmutableIntList |
append(int element)
Returns a copy of this list with one element added.
|
ImmutableIntList |
append(Integer e)
Returns a list that consists of a this list's elements plus a given
element.
|
ImmutableIntList |
appendAll(Iterable<Integer> list)
Returns a copy of this list with all of the given integers added.
|
void |
clear() |
boolean |
contains(@Nullable Object o) |
boolean |
containsAll(Collection<?> c) |
static ImmutableIntList |
copyOf(Iterable<? extends Number> list)
Creates an ImmutableIntList from an iterable of
Number. |
static ImmutableIntList |
copyOf(Iterator<? extends Number> list)
Creates an ImmutableIntList from an iterator of
Number. |
static ImmutableIntList |
copyOf(Number... numbers)
Creates an ImmutableIntList from an array of
Number. |
boolean |
equals(@Nullable Object obj) |
Integer |
get(int index) |
int |
getInt(int index) |
int |
hashCode() |
static ImmutableIntList |
identity(int count)
Returns the identity list [0, ..., count - 1].
|
ImmutableIntList |
incr(int offset)
Increments
offset to each element of the list and
returns a new int list. |
int |
indexOf(int seek) |
int |
indexOf(@Nullable Object o) |
boolean |
isEmpty() |
Iterator<Integer> |
iterator() |
int |
lastIndexOf(int seek) |
int |
lastIndexOf(@Nullable Object o) |
ListIterator<Integer> |
listIterator() |
ListIterator<Integer> |
listIterator(int index) |
static ImmutableIntList |
of()
Returns an empty ImmutableIntList.
|
static ImmutableIntList |
of(int... ints)
Creates an ImmutableIntList from an array of
int. |
static List<Integer> |
range(int lower,
int upper)
Returns a list that contains the values lower to upper - 1.
|
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) |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
int[] |
toIntArray()
Returns an array of
ints with the same contents as this list. |
List<Integer> |
toIntegerList()
Returns an List of
Integer. |
String |
toString() |
toListclone, finalize, getClass, notify, notifyAll, wait, wait, waitreplaceAll, sort, spliteratorparallelStream, removeIf, streampublic static ImmutableIntList of()
public static ImmutableIntList of(int... ints)
int.public static ImmutableIntList copyOf(Number... numbers)
Number.public static ImmutableIntList copyOf(Iterable<? extends Number> list)
Number.public static ImmutableIntList copyOf(Iterator<? extends Number> list)
Number.public int hashCode()
public boolean equals(@Nullable Object obj)
public boolean isEmpty()
public int size()
public Object[] toArray()
public <T> T[] toArray(T[] a)
public int[] toIntArray()
ints with the same contents as this list.public Integer get(int index)
public int getInt(int index)
public ListIterator<Integer> listIterator()
listIterator in interface List<Integer>public ListIterator<Integer> listIterator(int index)
listIterator in interface List<Integer>public int indexOf(@Nullable Object o)
public int indexOf(int seek)
public int lastIndexOf(@Nullable Object o)
public int lastIndexOf(int seek)
public ImmutableIntList append(Integer e)
FlatLists.AbstractFlatListappend in class FlatLists.AbstractFlatList<Integer>public ImmutableIntList append(int element)
public static List<Integer> range(int lower, int upper)
For example, range(1, 3) contains [1, 2].
public static ImmutableIntList identity(int count)
Mappings.isIdentity(List, int)public ImmutableIntList appendAll(Iterable<Integer> list)
public ImmutableIntList incr(int offset)
offset to each element of the list and
returns a new int list.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 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.