public class ImmutableIntList extends FlatLists.AbstractFlatList<Integer>
Integer values backed by an array of
ints.| Modifier and Type | Method and Description |
|---|---|
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(Object obj) |
Integer |
get(int index) |
int |
getInt(int index) |
int |
hashCode() |
static ImmutableIntList |
identity(int count)
Returns the identity list [0, ..., count - 1].
|
int |
indexOf(int seek) |
int |
indexOf(Object o) |
boolean |
isEmpty() |
Iterator<Integer> |
iterator() |
int |
lastIndexOf(int seek) |
int |
lastIndexOf(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.
|
int |
size() |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
int[] |
toIntArray()
Returns an array of
ints with the same contents as this list. |
String |
toString() |
add, add, addAll, addAll, asArrayList, clear, contains, containsAll, remove, remove, removeAll, retainAll, set, subListpublic 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(Object obj)
public boolean isEmpty()
isEmpty in interface Collection<Integer>isEmpty in interface List<Integer>isEmpty in class FlatLists.AbstractFlatList<Integer>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>listIterator in class FlatLists.AbstractFlatList<Integer>public ListIterator<Integer> listIterator(int index)
listIterator in interface List<Integer>listIterator in class FlatLists.AbstractFlatList<Integer>public int indexOf(Object o)
public int indexOf(int seek)
public int lastIndexOf(Object o)
public int lastIndexOf(int seek)
public static List<Integer> range(int lower, int upper)
For example, range(1, 3) contains [1, 2].
public static ImmutableIntList identity(int count)
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.