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, wait
nextCapacity, size, toArray
public 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
- indexi
public void set(int i, long value)
i
- indexvalue
- new value for element i
public void add(long value)
value
- value to appendpublic long[] toLongArray()
Copyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.