public abstract static class WrapperCollections.AbstractWrapperLongArray<V> extends Object implements LongArray<V>
LongArray.Iterator<V>
Constructor and Description |
---|
AbstractWrapperLongArray() |
Modifier and Type | Method and Description |
---|---|
long |
add(V oValue)
Add the passed element value to the LongArray and return the index at
which the element value was stored.
|
V |
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.
|
abstract WrapperCollections.AbstractWrapperLongArray<V> |
clone()
Make a clone of the LongArray.
|
boolean |
contains(V oValue)
Determine if the LongArray contains the specified element.
|
protected abstract LongArray<V> |
delegate()
Return the delegate LongArray.
|
boolean |
exists(long lIndex)
Determine if the specified index is in use.
|
V |
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.
|
V |
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(V 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(V oValue,
long lIndex)
Return the index in this LongArray of the first occurrence of
the specified element such that (index greater or equal to lIndex), or
NOT_FOUND if this LongArray does not contain the specified element.
|
boolean |
isEmpty()
Test for empty LongArray.
|
LongArray.Iterator<V> |
iterator()
Obtain a LongArray.Iterator of the contents of the LongArray in
order of increasing indices.
|
LongArray.Iterator<V> |
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(V 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(V oValue,
long lIndex)
Return the index in this LongArray of the last occurrence of
the specified element such that (index less then or equal to lIndex), or
NOT_FOUND if this LongArray does not contain the specified element.
|
V |
remove(long lIndex)
Remove the specified index from the LongArray, returning its associated
value.
|
void |
remove(long lIndexFrom,
long lIndexTo)
Remove all nodes in the specified range.
|
LongArray.Iterator<V> |
reverseIterator()
Obtain a LongArray.Iterator of the contents of the LongArray in
reverse order (decreasing indices).
|
LongArray.Iterator<V> |
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.
|
V |
set(long lIndex,
V oValue)
Add the passed item to the LongArray at the specified index.
|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public abstract WrapperCollections.AbstractWrapperLongArray<V> clone()
LongArray
public V get(long lIndex)
LongArray
public long floorIndex(long lIndex)
LongArray
floorIndex
in interface LongArray<V>
lIndex
- the indexpublic V floor(long lIndex)
LongArray
public long ceilingIndex(long lIndex)
LongArray
ceilingIndex
in interface LongArray<V>
lIndex
- the indexpublic V ceiling(long lIndex)
LongArray
public V set(long lIndex, V oValue)
LongArray
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.
public long add(V oValue)
LongArray
public boolean exists(long lIndex)
LongArray
public V remove(long lIndex)
LongArray
public void remove(long lIndexFrom, long lIndexTo)
LongArray
public boolean contains(V oValue)
LongArray
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)).
public void clear()
LongArray
public boolean isEmpty()
LongArray
public int getSize()
LongArray
public LongArray.Iterator<V> iterator()
LongArray
public LongArray.Iterator<V> iterator(long lIndex)
LongArray
public LongArray.Iterator<V> reverseIterator()
LongArray
reverseIterator
in interface LongArray<V>
public LongArray.Iterator<V> reverseIterator(long lIndex)
LongArray
reverseIterator
in interface LongArray<V>
lIndex
- the LongArray index to iterate frompublic long getFirstIndex()
LongArray
getFirstIndex
in interface LongArray<V>
public long getLastIndex()
LongArray
getLastIndex
in interface LongArray<V>
public long indexOf(V oValue)
LongArray
public long indexOf(V oValue, long lIndex)
LongArray
public long lastIndexOf(V oValue)
LongArray
lastIndexOf
in interface LongArray<V>
oValue
- the object to find the index forpublic long lastIndexOf(V oValue, long lIndex)
LongArray
lastIndexOf
in interface LongArray<V>
oValue
- the object to find the index forlIndex
- the index to compare to