public abstract class IntList extends Object
forValues(int...) or forValues(int[], int, int) or IntList.Array| Modifier and Type | Class and Description |
|---|---|
static class |
IntList.Array
An implementation of an IntList that is mutable and backed by an array
|
| Constructor and Description |
|---|
IntList() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(int value)
Returns true if this list contains this value.
|
static IntList |
forValues(int... values)
Creates a new IntList containing these values.
|
static IntList |
forValues(int[] values,
int minIndex,
int maxIndexExclusive)
Creates a new IntList containing a subset of the values in an array.
|
abstract int |
get(int index)
Gets the value at this index.
|
boolean |
isEmpty()
Returns true if this list is empty
size()==0) |
abstract int |
size()
Returns the size of this list like
List.size() |
IntList |
subList(int startIndex,
int endIndexExclusive)
Creates a sub list
|
String |
toString() |
public abstract int size()
List.size()public abstract int get(int index)
List.get(int)index - the 0-based index of the element to getpublic boolean isEmpty()
size()==0)size()==0)public boolean contains(int value)
value - the value to check if present in this listpublic IntList subList(int startIndex, int endIndexExclusive)
startIndex - the first index to include in the sub listendIndexExclusive - the last index (exclusive) to include in the sub listpublic static IntList forValues(int... values)
values - the values in the listpublic static IntList forValues(int[] values, int minIndex, int maxIndexExclusive)
values - the values in the listminIndex - the index of the first value from 'values' to include in the listmaxIndexExclusive - the index of the last value (exclusive) from 'values' to include in the list