public final class ArrayLong extends ListLong implements Serializable
long[]
into a ListLong
.Constructor and Description |
---|
ArrayLong(long... array)
A new
ArrayLong that wraps around the given array. |
ArrayLong(long[] array,
boolean readOnly)
A new
ArrayLong that wraps around the given array. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
long |
getLong(int index)
Returns the element at the specified position in this list casted to a long.
|
IteratorLong |
iterator()
Returns an iterator over the elements of the collection.
|
void |
setLong(int index,
long value)
Changes the element at the specified position, casting to the internal
representation.
|
int |
size()
Returns the number of elements in the collection.
|
public ArrayLong(long... array)
ArrayLong
that wraps around the given array.array
- an arraypublic ArrayLong(long[] array, boolean readOnly)
ArrayLong
that wraps around the given array.array
- an arrayreadOnly
- if false the wrapper allows writes to the arraypublic final IteratorLong iterator()
CollectionNumber
iterator
in interface CollectionLong
iterator
in interface CollectionNumber
iterator
in class ListLong
public final int size()
CollectionNumber
size
in interface CollectionNumber
public long getLong(int index)
ListNumber
getLong
in interface ListNumber
index
- position of the element to returnpublic void setLong(int index, long value)
ListNumber
setLong
in interface ListNumber
setLong
in class ListLong
index
- position of the element to changevalue
- the new valueCopyright © 2015. All rights reserved.