public final class ArrayInt extends ListInt implements Serializable
int[] into a ListInt.| Constructor and Description |
|---|
ArrayInt(int... array)
A new
ArrayInt that wraps around the given array. |
ArrayInt(int[] array,
boolean readOnly)
A new
ArrayInt that wraps around the given array. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
int |
getInt(int index)
Returns the element at the specified position in this list casted to an int.
|
IteratorInt |
iterator()
Returns an iterator over the elements of the collection.
|
void |
setInt(int index,
int value)
Changes the element at the specified position, casting to the internal
representation.
|
int |
size()
Returns the number of elements in the collection.
|
public ArrayInt(int... array)
ArrayInt that wraps around the given array.array - an arraypublic ArrayInt(int[] array,
boolean readOnly)
ArrayInt that wraps around the given array.array - an arrayreadOnly - if false the wrapper allows writes to the arraypublic final IteratorInt iterator()
CollectionNumberiterator in interface CollectionIntiterator in interface CollectionNumberiterator in class ListIntpublic final int size()
CollectionNumbersize in interface CollectionNumberpublic int getInt(int index)
ListNumbergetInt in interface ListNumberindex - position of the element to returnpublic void setInt(int index,
int value)
ListNumbersetInt in interface ListNumbersetInt in class ListIntindex - position of the element to changevalue - the new valueCopyright © 2015. All rights reserved.