public class LongList extends PrimitiveList
| Constructor | Description |
|---|---|
LongList() |
Constructs a new list.
|
LongList(int size) |
Constructs a new list with a given initial capacity.
|
LongList(long[] array) |
Constructs a new list initialised to the contents of a given array.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
add(long value) |
Appends a value to the end of this list.
|
long |
get(int i) |
Returns the element at a given position.
|
void |
set(int i,
long value) |
Sets the element at a given position.
|
long[] |
toLongArray() |
Returns the contents of this list as an array.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnextCapacity, size, toArraypublic LongList()
public LongList(int size)
size - initial capacitypublic LongList(long[] array)
array - array whose contents form initial contents of listpublic long get(int i)
i - indexipublic void set(int i,
long value)
i - indexvalue - new value for element ipublic void add(long value)
value - value to appendpublic long[] toLongArray()
Copyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.