public final class ArrayLong extends Object
| Constructor and Description |
|---|
ArrayLong()
Create a list of default size
|
ArrayLong(ArrayLong template)
Create a list based on an existing ArrayInt, of size of the template
|
ArrayLong(int initialCapacity)
Create a list of given size
|
ArrayLong(long[] initialValues)
Create a list based on a supplied array
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(long element)
append one more entry
|
void |
addAll(ArrayLong template)
append all of another
|
void |
addAll(long[] elements)
append a group of entries
|
void |
clear()
clear all the entries
|
long |
firstElement()
get the first entry to be written.
|
long |
get(int index)
retrieve one entry
|
boolean |
isEmpty()
is the list empty
|
IteratorLong |
iterator()
get an iterator to go through the list
|
long |
lastElement()
get the last entry to be written.
|
long |
set(int index,
long element)
modify one particular entry
|
int |
size()
get the number of used entries
|
void |
sort()
arrange the entries in ascending order
|
long[] |
toArray()
convert to an array
|
public ArrayLong()
public ArrayLong(int initialCapacity)
initialCapacity - public ArrayLong(long[] initialValues)
initialValues - a copy is taken of this arraypublic ArrayLong(ArrayLong template)
template - a copy is taken of these valuespublic void add(long element)
element - the int to add to the endpublic void addAll(long[] elements)
elements - public void addAll(ArrayLong template)
template - public long set(int index,
long element)
index - element - public long get(int index)
index - public int size()
public long[] toArray()
public boolean isEmpty()
public IteratorLong iterator()
public void clear()
public long lastElement()
public long firstElement()
public void sort()