|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuk.ac.starlink.util.PrimitiveList
uk.ac.starlink.util.LongList
public class LongList
Extendable array of longs..
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class uk.ac.starlink.util.PrimitiveList |
|---|
nextCapacity, size, toArray |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LongList()
public LongList(int size)
size - initial capacitypublic LongList(long[] array)
array - array whose contents form initial contents of list| Method Detail |
|---|
public long get(int i)
i - index
i
public void set(int i,
long value)
i - indexvalue - new value for element ipublic void add(long value)
value - value to appendpublic long[] toLongArray()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||