public class TimeSparseArray<E> extends LongSparseArray<E>
Constructor and Description |
---|
TimeSparseArray() |
TimeSparseArray(int initialCapacity) |
Modifier and Type | Method and Description |
---|---|
int |
closestIndexOnOrAfter(long time)
Finds the index of the first element whose timestamp is greater or equal to
the given time.
|
int |
closestIndexOnOrBefore(long time)
Finds the index of the first element whose timestamp is less than or equal to
the given time.
|
append, clear, clone, delete, get, get, indexOfKey, indexOfValue, keyAt, put, remove, removeAt, setValueAt, size, toString, valueAt
public TimeSparseArray()
public TimeSparseArray(int initialCapacity)
public int closestIndexOnOrAfter(long time)
time
- The timestamp for which to search the array.public int closestIndexOnOrBefore(long time)
time
- The timestamp for which to search the array.