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