public class SimpleLongArray extends com.oracle.common.collections.AbstractLongArray implements Serializable, LongArray
| Modifier and Type | Class and Description |
|---|---|
class |
SimpleLongArray.Iterator
An Iterator that adds a "current element" concept, similar to the
Map.Entry interface. |
| Modifier and Type | Field and Description |
|---|---|
static Object[] |
EMPTY
Empty array of objects.
|
static long |
MAX
Maximum index value.
|
| Constructor and Description |
|---|
SimpleLongArray()
Construct an empty SimpleLongArray.
|
| Modifier and Type | Method and Description |
|---|---|
long |
add(Object oValue)
Add the passed element value to the LongArray and return the index at which the element value was stored.
|
Object |
ceiling(long lIndex)
Return the "first" value with an index which is greater than or equal to the specified index.
|
long |
ceilingIndex(long lIndex)
Return the "first" index which is greater than or equal to the specified index.
|
void |
clear()
Remove all nodes from the LongArray.
|
SimpleLongArray |
clone()
Make a clone of the LongArray.
|
boolean |
contains(Object oValue)
Determine if the LongArray contains the specified element.
|
boolean |
exists(long lIndex)
Determine if the specified index is in use.
|
Object |
floor(long lIndex)
Return the "first" value with an index which is less than or equal to the specified index.
|
long |
floorIndex(long lIndex)
Return the "first" index which is less than or equal to the specified index.
|
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(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.
|
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.
|
long |
lastIndexOf(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.
|
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.
|
Object |
set(long lIndex, Object oValue)
Add the passed item to the LongArray at the specified index.
|
equals, hashCode, indexOf, lastIndexOf, remove, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitequals, indexOf, lastIndexOf, remove, toStringforEach, spliteratorpublic static final long MAX
public static final Object[] EMPTY
public Object get(long lIndex)
get in interface com.oracle.common.collections.LongArrayget in class com.oracle.common.collections.AbstractLongArraylIndex - a long index valuepublic long floorIndex(long lIndex)
com.oracle.common.collections.LongArrayfloorIndex in interface com.oracle.common.collections.LongArraylIndex - the indexpublic Object floor(long lIndex)
com.oracle.common.collections.LongArrayfloor in interface com.oracle.common.collections.LongArraylIndex - the indexpublic long ceilingIndex(long lIndex)
com.oracle.common.collections.LongArrayceilingIndex in interface com.oracle.common.collections.LongArraylIndex - the indexpublic Object ceiling(long lIndex)
com.oracle.common.collections.LongArrayceiling in interface com.oracle.common.collections.LongArraylIndex - the indexpublic 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.
set in interface com.oracle.common.collections.LongArraylIndex - a long index valueoValue - the object to store at the specified indexpublic long add(Object oValue)
add in interface com.oracle.common.collections.LongArrayadd in class com.oracle.common.collections.AbstractLongArrayoValue - the object to add to the LongArraypublic boolean exists(long lIndex)
exists in interface com.oracle.common.collections.LongArrayexists in class com.oracle.common.collections.AbstractLongArraylIndex - a long index valuepublic Object remove(long lIndex)
remove in interface com.oracle.common.collections.LongArrayremove in class com.oracle.common.collections.AbstractLongArraylIndex - the index into the LongArraypublic boolean contains(Object oValue)
More formally, returns true if and only if this LongArray contains at least one element e such that (oValue==null ? e==null : oValue.equals(e)).
contains in interface com.oracle.common.collections.LongArraycontains in class com.oracle.common.collections.AbstractLongArrayoValue - element whose presence in this list is to be testedpublic void clear()
clear in interface com.oracle.common.collections.LongArrayclear in class com.oracle.common.collections.AbstractLongArraypublic boolean isEmpty()
isEmpty in interface com.oracle.common.collections.LongArrayisEmpty in class com.oracle.common.collections.AbstractLongArraypublic int getSize()
getSize in interface com.oracle.common.collections.LongArraygetSize in class com.oracle.common.collections.AbstractLongArraypublic LongArray.Iterator iterator()
public LongArray.Iterator iterator(long lIndex)
iterator in interface com.oracle.common.collections.LongArraylIndex - the LongArray index to iterate frompublic LongArray.Iterator reverseIterator()
reverseIterator in interface com.oracle.common.collections.LongArraypublic LongArray.Iterator reverseIterator(long lIndex)
reverseIterator in interface com.oracle.common.collections.LongArraylIndex - the LongArray index to iterate frompublic long getFirstIndex()
getFirstIndex in interface com.oracle.common.collections.LongArraygetFirstIndex in class com.oracle.common.collections.AbstractLongArraypublic long getLastIndex()
getLastIndex in interface com.oracle.common.collections.LongArraygetLastIndex in class com.oracle.common.collections.AbstractLongArraypublic long indexOf(Object oValue, long lIndex)
indexOf in interface com.oracle.common.collections.LongArrayindexOf in class com.oracle.common.collections.AbstractLongArrayoValue - the object to find the index forlIndex - the index to compare topublic long lastIndexOf(Object oValue, long lIndex)
lastIndexOf in interface com.oracle.common.collections.LongArraylastIndexOf in class com.oracle.common.collections.AbstractLongArrayoValue - the object to find the index forlIndex - the index to compare topublic SimpleLongArray clone()
clone in interface com.oracle.common.collections.LongArrayclone in class com.oracle.common.collections.AbstractLongArray