|
Oracle® Coherence Java API Reference Release 12.1.2.0.3 E26043-02 |
|||||||
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 index 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. |
Field Summary | |
---|---|
static long |
NOT_FOUND This index is used to indicate that an element was not found. |
Method Summary | |
---|---|
long |
add(java.lang.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. |
java.lang.Object |
clone() Make a clone of the LongArray. |
boolean |
contains(java.lang.Object oValue) Determine if the LongArray contains the specified element. |
boolean |
equals(java.lang.Object o) Test for LongArray equality. |
boolean |
exists(long lIndex) Determine if the specified index is in use. |
java.lang.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. |
long |
indexOf(java.lang.Object oValue) Return the index in this LongArray of the first occurrence of the specified element, or NOT_FOUND if this LongArray does not contain the specified element. |
long |
indexOf(java.lang.Object oValue, long lIndex) Return the index in this LongArray of the first occurrence of the specified element such that (index >= lIndex), or NOT_FOUND if this LongArray does not contain the specified element. |
boolean |
isEmpty() Test for empty LongArray. |
LongArray.Iterator |
iterator() Obtain a LongArray.Iterator of the contents of the LongArray in order of increasing indices. |
LongArray.Iterator |
iterator(long lIndex) Obtain a LongArray.Iterator of the contents of the LongArray in order of increasing indices, 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. |
long |
lastIndexOf(java.lang.Object oValue) Return the index in this LongArray of the last occurrence of the specified element, or NOT_FOUND if this LongArray does not contain the specified element. |
long |
lastIndexOf(java.lang.Object oValue, long lIndex) Return the index in this LongArray of the last occurrence of the specified element such that (index <= lIndex), or NOT_FOUND if this LongArray does not contain the specified element. |
java.lang.Object |
remove(long lIndex) Remove the specified index from the LongArray, returning its associated value. |
LongArray.Iterator |
reverseIterator() Obtain a LongArray.Iterator of the contents of the LongArray in reverse order (decreasing indices). |
LongArray.Iterator |
reverseIterator(long lIndex) Obtain a LongArray.Iterator of the contents of the LongArray in reverse order (decreasing indices), 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 less than or equal to the specified index, or will throw a NoSuchElementException if there is no such existent index. |
java.lang.Object |
set(long lIndex, java.lang.Object oValue) Add the passed item to the LongArray at the specified index. |
java.lang.String |
toString() Provide a string representation of the LongArray. |
Field Detail |
---|
static final long NOT_FOUND
Method Detail |
---|
java.lang.Object get(long lIndex)
lIndex
- a long index valuejava.lang.Object set(long lIndex, java.lang.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 indexlong add(java.lang.Object oValue)
oValue
- the object to add to the LongArrayboolean exists(long lIndex)
lIndex
- a long index valuejava.lang.Object remove(long lIndex)
lIndex
- the index into the LongArrayboolean contains(java.lang.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 testedvoid clear()
boolean isEmpty()
int getSize()
LongArray.Iterator iterator()
LongArray.Iterator iterator(long lIndex)
lIndex
- the LongArray index to iterate fromLongArray.Iterator reverseIterator()
LongArray.Iterator reverseIterator(long lIndex)
lIndex
- the LongArray index to iterate fromlong getFirstIndex()
long getLastIndex()
long indexOf(java.lang.Object oValue)
long indexOf(java.lang.Object oValue, long lIndex)
long lastIndexOf(java.lang.Object oValue)
long lastIndexOf(java.lang.Object oValue, long lIndex)
java.lang.String toString()
boolean equals(java.lang.Object o)
o
- an Object to compare to this LongArray for equalityjava.lang.Object clone()
|
Oracle® Coherence Java API Reference Release 12.1.2.0.3 E26043-02 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |