F - the type of the provided LongArrayT - the type of the desired typepublic static class ConverterCollections.ConverterLongArray<F,T> extends Object implements LongArray<T>
F) to the desired from (type T).| Modifier and Type | Class and Description |
|---|---|
protected class |
ConverterCollections.ConverterLongArray.ConverterLongArrayIterator
An Iterator that can convert from raw types to desired types.
|
LongArray.Iterator<V>| Modifier and Type | Field and Description |
|---|---|
protected Converter<T,F> |
f_convDown
The Converter to use to convert from type T to type F.
|
protected Converter<F,T> |
f_convUp
The Converter to use to convert from type F to type T.
|
protected LongArray<F> |
f_laDelegate
The LongArray to delegate to.
|
| Constructor and Description |
|---|
ConverterLongArray(LongArray<F> laDelegate,
Converter<F,T> convUp,
Converter<T,F> convDown)
Construct a LongArray that converts the values from type
F
to type T. |
| Modifier and Type | Method and Description |
|---|---|
long |
add(T oValue)
Add the passed element value to the LongArray and return the index at
which the element value was stored.
|
T |
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.
|
LongArray<T> |
clone()
Make a clone of the LongArray.
|
boolean |
contains(T oValue)
Determine if the LongArray contains the specified element.
|
boolean |
exists(long lIndex)
Determine if the specified index is in use.
|
T |
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.
|
T |
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(T 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(T 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.
|
protected LongArray.Iterator<T> |
instantiateIterator(LongArray.Iterator<F> iter)
Instantiate a new Iterator wrapping the provided iterator.
|
boolean |
isEmpty()
Test for empty LongArray.
|
LongArray.Iterator<T> |
iterator()
Obtain a LongArray.Iterator of the contents of the LongArray in
order of increasing indices.
|
LongArray.Iterator<T> |
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(T 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(T 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.
|
T |
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<T> |
reverseIterator()
Obtain a LongArray.Iterator of the contents of the LongArray in
reverse order (decreasing indices).
|
LongArray.Iterator<T> |
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.
|
T |
set(long lIndex,
T oValue)
Add the passed item to the LongArray at the specified index.
|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorprotected final Converter<F,T> f_convUp
public T get(long lIndex)
LongArraypublic long floorIndex(long lIndex)
LongArrayfloorIndex in interface LongArray<T>lIndex - the indexpublic T floor(long lIndex)
LongArraypublic long ceilingIndex(long lIndex)
LongArrayceilingIndex in interface LongArray<T>lIndex - the indexpublic T ceiling(long lIndex)
LongArraypublic T set(long lIndex, T oValue)
LongArrayIf 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(T oValue)
LongArraypublic boolean exists(long lIndex)
LongArraypublic T remove(long lIndex)
LongArraypublic void remove(long lIndexFrom,
long lIndexTo)
LongArraypublic boolean contains(T oValue)
LongArrayMore 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()
LongArraypublic boolean isEmpty()
LongArraypublic int getSize()
LongArraypublic LongArray.Iterator<T> iterator()
LongArraypublic LongArray.Iterator<T> iterator(long lIndex)
LongArraypublic LongArray.Iterator<T> reverseIterator()
LongArrayreverseIterator in interface LongArray<T>public LongArray.Iterator<T> reverseIterator(long lIndex)
LongArrayreverseIterator in interface LongArray<T>lIndex - the LongArray index to iterate frompublic long getFirstIndex()
LongArraygetFirstIndex in interface LongArray<T>public long getLastIndex()
LongArraygetLastIndex in interface LongArray<T>public long indexOf(T oValue)
LongArraypublic long indexOf(T oValue, long lIndex)
LongArraypublic long lastIndexOf(T oValue)
LongArraylastIndexOf in interface LongArray<T>oValue - the object to find the index forpublic long lastIndexOf(T oValue, long lIndex)
LongArraylastIndexOf in interface LongArray<T>oValue - the object to find the index forlIndex - the index to compare topublic LongArray<T> clone()
LongArrayprotected LongArray.Iterator<T> instantiateIterator(LongArray.Iterator<F> iter)
iter - the Iterator to wrap