|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.oracle.common.collections.AbstractLongArray
com.tangosol.util.SimpleLongArray
public class SimpleLongArray
An implementation of LongArray that stores values in an array, thus is actually an "IntArray". Optimized for 0-based arrays. Null values are not considered to be entries, thus will not affect "first" and "last" and will not show up in the iterator. Note: not designed to be thread safe.
Nested Class Summary | |
---|---|
class |
SimpleLongArray.Iterator An Iterator that adds a "current element" concept, similar to the Map.Entry interface. |
Field Summary | |
---|---|
static java.lang.Object[] |
EMPTY Empty array of objects. |
static long |
MAX Maximum index value. |
Fields inherited from interface com.oracle.common.collections.LongArray |
---|
NOT_FOUND |
Constructor Summary | |
---|---|
SimpleLongArray() Construct an empty SimpleLongArray. |
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. |
java.lang.Object |
ceiling(long lIndex) |
long |
ceilingIndex(long lIndex) |
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 |
exists(long lIndex) Determine if the specified index is in use. |
java.lang.Object |
floor(long lIndex) |
long |
floorIndex(long lIndex) |
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, 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(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. |
Methods inherited from class com.oracle.common.collections.AbstractLongArray |
---|
equals, hashCode, indexOf, lastIndexOf, remove, toString |
Methods inherited from interface com.oracle.common.collections.LongArray |
---|
equals, indexOf, lastIndexOf, remove, toString |
Field Detail |
---|
public static final long MAX
public static final java.lang.Object[] EMPTY
Constructor Detail |
---|
public SimpleLongArray()
Method Detail |
---|
public java.lang.Object get(long lIndex)
get
in interface com.oracle.common.collections.LongArray
get
in class com.oracle.common.collections.AbstractLongArray
lIndex
- a long index valuepublic long floorIndex(long lIndex)
floorIndex
in interface com.oracle.common.collections.LongArray
public java.lang.Object floor(long lIndex)
floor
in interface com.oracle.common.collections.LongArray
public long ceilingIndex(long lIndex)
ceilingIndex
in interface com.oracle.common.collections.LongArray
public java.lang.Object ceiling(long lIndex)
ceiling
in interface com.oracle.common.collections.LongArray
public java.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.
set
in interface com.oracle.common.collections.LongArray
lIndex
- a long index valueoValue
- the object to store at the specified indexpublic long add(java.lang.Object oValue)
add
in interface com.oracle.common.collections.LongArray
add
in class com.oracle.common.collections.AbstractLongArray
oValue
- the object to add to the LongArraypublic boolean exists(long lIndex)
exists
in interface com.oracle.common.collections.LongArray
exists
in class com.oracle.common.collections.AbstractLongArray
lIndex
- a long index valuepublic java.lang.Object remove(long lIndex)
remove
in interface com.oracle.common.collections.LongArray
remove
in class com.oracle.common.collections.AbstractLongArray
lIndex
- the index into the LongArraypublic boolean contains(java.lang.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.LongArray
contains
in class com.oracle.common.collections.AbstractLongArray
oValue
- element whose presence in this list is to be testedpublic void clear()
clear
in interface com.oracle.common.collections.LongArray
clear
in class com.oracle.common.collections.AbstractLongArray
public boolean isEmpty()
isEmpty
in interface com.oracle.common.collections.LongArray
isEmpty
in class com.oracle.common.collections.AbstractLongArray
public int getSize()
getSize
in interface com.oracle.common.collections.LongArray
getSize
in class com.oracle.common.collections.AbstractLongArray
public LongArray.Iterator iterator()
iterator
in interface com.oracle.common.collections.LongArray
iterator
in interface java.lang.Iterable
public LongArray.Iterator iterator(long lIndex)
iterator
in interface com.oracle.common.collections.LongArray
lIndex
- the LongArray index to iterate frompublic LongArray.Iterator reverseIterator()
reverseIterator
in interface com.oracle.common.collections.LongArray
public LongArray.Iterator reverseIterator(long lIndex)
reverseIterator
in interface com.oracle.common.collections.LongArray
lIndex
- the LongArray index to iterate frompublic long getFirstIndex()
getFirstIndex
in interface com.oracle.common.collections.LongArray
getFirstIndex
in class com.oracle.common.collections.AbstractLongArray
public long getLastIndex()
getLastIndex
in interface com.oracle.common.collections.LongArray
getLastIndex
in class com.oracle.common.collections.AbstractLongArray
public long indexOf(java.lang.Object oValue, long lIndex)
indexOf
in interface com.oracle.common.collections.LongArray
indexOf
in class com.oracle.common.collections.AbstractLongArray
public long lastIndexOf(java.lang.Object oValue, long lIndex)
lastIndexOf
in interface com.oracle.common.collections.LongArray
lastIndexOf
in class com.oracle.common.collections.AbstractLongArray
public java.lang.Object clone()
clone
in interface com.oracle.common.collections.LongArray
clone
in class com.oracle.common.collections.AbstractLongArray
|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |