|
-bottom | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.jivesoftware.util.LongList
A simplified List for long values. Only the bare number of methods needed by Jive have been implemented so far, so additional implementation work would be welcome.
The implementation uses an array for maximum speed. If the number of elements grows larger than capacity, the capacity will automatically grow.
| Constructor Summary | |
LongList()
Creates a new list of long values with a default capacity of 50. |
|
LongList(int initialCapacity)
Creates a new list of long values with a specified initial capacity. |
|
| Method Summary | |
void |
add(long value)
Adds a new long value to the end of the list. |
long |
get(int index)
Returns the long value at the specified index. |
int |
size()
Returns the number of elements in the list. |
long[] |
toArray()
Returns a new array containing the list elements. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Constructor Detail |
public LongList()
public LongList(int initialCapacity)
initialCapacity - a capacity to initialize the list with.| Method Detail |
public void add(long value)
public long get(int index)
index - the index of the value to return.public int size()
public long[] toArray()
public String toString()
|
-bottom | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||