|
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.oracle.common.collections.AbstractSparseArray
com.tangosol.util.PrimitiveSparseArray
public class PrimitiveSparseArray
A data structure resembling a long array indexed by long values.
While the PrimitiveSparseArray implements the LongArray interface, it stores all values as primitive longs, and as such any Object supplied to its LongArray interface must be provided as a java.lang.Long. The PrimitiveSparseArray provides additional methods whose signatures utilize primitive longs to avoid the creation of temporary Long objects.
SparseArray
Nested Class Summary | |
---|---|
class |
PrimitiveSparseArray.Iterator Iterator over long values stored in the tree. |
protected static class |
PrimitiveSparseArray.PrimitiveNode Node mapping long key to Object value. |
Nested classes/interfaces inherited from class com.oracle.common.collections.AbstractSparseArray |
---|
com.oracle.common.collections.AbstractSparseArray.Crawler, com.oracle.common.collections.AbstractSparseArray.Node |
Field Summary |
---|
Fields inherited from class com.oracle.common.collections.AbstractSparseArray |
---|
m_head, m_size |
Fields inherited from interface com.oracle.common.collections.LongArray |
---|
NOT_FOUND |
Constructor Summary | |
---|---|
PrimitiveSparseArray() Default constructor. |
|
PrimitiveSparseArray(PrimitiveSparseArray array) Copy constructor. |
Method Summary | |
---|---|
long |
getPrimitive(long lIndex) Return the value stored at the specified index. |
protected com.oracle.common.collections.AbstractSparseArray.Crawler |
instantiateCrawler(com.oracle.common.collections.AbstractSparseArray.Node head, int fromdir, boolean fForward) |
protected com.oracle.common.collections.AbstractSparseArray.Node |
instantiateNode(long lKey, long lValue) Create a new Node with the specified key and value. |
protected com.oracle.common.collections.AbstractSparseArray.Node |
instantiateNode(long lKey, java.lang.Object oValue) |
LongArray.Iterator |
iterator() |
LongArray.Iterator |
iterator(long lIndex) |
long |
removePrimitive(long lIndex) Remove the specified index from the PrimitiveSparseArray, returning its associated value. |
LongArray.Iterator |
reverseIterator() |
LongArray.Iterator |
reverseIterator(long lIndex) |
long |
setPrimitive(long lIndex, long lValue) Add the passed item to the PrimitiveSparseArray at the specified index. |
Methods inherited from class com.oracle.common.collections.AbstractSparseArray |
---|
adjustDoubleBalance, balancedInsertion, balancePostRemove, ceiling, ceilingIndex, clear, clone, doubleRotate, exists, find, findInsertionPoint, floor, floorIndex, get, getFirstIndex, getLastIndex, getSize, print, remove, remove, remove, replace, rotate, set, validate |
Methods inherited from class com.oracle.common.collections.AbstractLongArray |
---|
add, contains, equals, hashCode, indexOf, indexOf, isEmpty, lastIndexOf, lastIndexOf, toString |
Methods inherited from interface com.oracle.common.collections.LongArray |
---|
add, ceiling, ceilingIndex, clear, clone, contains, equals, exists, floor, floorIndex, get, getFirstIndex, getLastIndex, getSize, indexOf, indexOf, isEmpty, lastIndexOf, lastIndexOf, remove, remove, set, toString |
Constructor Detail |
---|
public PrimitiveSparseArray()
public PrimitiveSparseArray(PrimitiveSparseArray array)
array
- a PrimitiveSparseArray to copy from.Method Detail |
---|
public LongArray.Iterator iterator()
iterator
in interface com.oracle.common.collections.LongArray
iterator
in interface java.lang.Iterable
iterator
in class com.oracle.common.collections.AbstractSparseArray
public LongArray.Iterator iterator(long lIndex)
iterator
in interface com.oracle.common.collections.LongArray
iterator
in class com.oracle.common.collections.AbstractSparseArray
public LongArray.Iterator reverseIterator()
reverseIterator
in interface com.oracle.common.collections.LongArray
reverseIterator
in class com.oracle.common.collections.AbstractSparseArray
public LongArray.Iterator reverseIterator(long lIndex)
reverseIterator
in interface com.oracle.common.collections.LongArray
reverseIterator
in class com.oracle.common.collections.AbstractSparseArray
public long getPrimitive(long lIndex)
lIndex
- a long index valuepublic long removePrimitive(long lIndex)
lIndex
- the index into the LongArraypublic long setPrimitive(long lIndex, long lValue)
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 valuelValue
- the long value to store at the specified indexprotected com.oracle.common.collections.AbstractSparseArray.Node instantiateNode(long lKey, java.lang.Object oValue)
instantiateNode
in class com.oracle.common.collections.AbstractSparseArray
protected com.oracle.common.collections.AbstractSparseArray.Node instantiateNode(long lKey, long lValue)
lKey
- the long keylValue
- the long valueprotected com.oracle.common.collections.AbstractSparseArray.Crawler instantiateCrawler(com.oracle.common.collections.AbstractSparseArray.Node head, int fromdir, boolean fForward)
instantiateCrawler
in class com.oracle.common.collections.AbstractSparseArray
|
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 |