|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LongArray
An interface, similar in its methods to List, and similar in its purpose to a Java array, designed for sparse storage and indexed by long values.
Unlike the List interface, the LongArray interface assumes that every valid index (i.e. greater than or equal to zero) can be accessed and has storage available.
Nested Class Summary | |
---|---|
static interface |
LongArray.Iterator
An Iterator that adds a "current element" concept, similar to the Map.Entry interface. |
Method Summary | |
---|---|
long |
add(Object oValue)
Add the passed element value to the LongArray and return the index at which the element value was stored. |
void |
clear()
Remove all nodes from the LongArray. |
Object |
clone()
Make a clone of the LongArray. |
boolean |
contains(Object oValue)
Determine if the LongArray contains the specified element. |
boolean |
equals(Object o)
Test for LongArray equality. |
boolean |
exists(long lIndex)
Determine if the specified index is in use. |
Object |
get(long lIndex)
Return the value stored at the specified index. |
long |
getFirstIndex()
Determine the first index that exists in the LongArray. |
long |
getLastIndex()
Determine the last index that exists in the LongArray. |
int |
getSize()
Determine the size of the LongArray. |
boolean |
isEmpty()
Test for empty LongArray. |
LongArray.Iterator |
iterator()
Obtain a LongArray.Iterator of the contents of the LongArray. |
LongArray.Iterator |
iterator(long lIndex)
Obtain a LongArray.Iterator of the contents of the LongArray, starting at a particular index such that the first call to next will set the location of the iterator at the first existent index that is greater than or equal to the specified index, or will throw a NoSuchElementException if there is no such existent index. |
Object |
remove(long lIndex)
Remove the specified index from the LongArray, returning its associated value. |
Object |
set(long lIndex,
Object oValue)
Add the passed item to the LongArray at the specified index. |
String |
toString()
Provide a string representation of the LongArray. |
Method Detail |
---|
Object get(long lIndex)
lIndex
- a long index value
Object set(long lIndex, Object oValue)
If the index is already used, the passed value will replace the current value stored with the key, and the replaced value will be returned.
It is expected that LongArray implementations will "grow" as necessary to support the specified index.
lIndex
- a long index valueoValue
- the object to store at the specified index
long add(Object oValue)
oValue
- the object to add to the LongArray
boolean exists(long lIndex)
lIndex
- a long index value
Object remove(long lIndex)
lIndex
- the index into the LongArray
boolean contains(Object oValue)
More formally, returns true if and only if this LongArray contains at least one element e such that (o==null ? e==null : o.equals(e)).
oValue
- element whose presence in this list is to be tested
void clear()
boolean isEmpty()
int getSize()
LongArray.Iterator iterator()
LongArray.Iterator iterator(long lIndex)
lIndex
- the LongArray index to iterate from
long getFirstIndex()
long getLastIndex()
String toString()
boolean equals(Object o)
o
- an Object to compare to this LongArray for equality
Object clone()
|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |