public final class HorizontalPositionsList extends Object
Constructor and Description |
---|
HorizontalPositionsList() |
HorizontalPositionsList(int increment,
boolean enableQuickLookup) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(long key,
long age) |
void |
clear() |
boolean |
containsKey(long key) |
void |
ensureCapacity(int c)
Ensures, that the list backend can store at least
c elements. |
long |
findKey(long key,
boolean upperBounds) |
int |
findKeyPosition(long coordinate,
boolean greater)
Tries to locate the key that matches the given key-parameter as closely as possible.
|
long |
getAge(long key) |
long |
getKeyAt(int indexPosition) |
long[] |
getKeys()
Copys the list contents into a new array.
|
long[] |
getKeys(long[] retval) |
long |
getNext(long key) |
long |
getPrevious(long key)
Returns the entry that is either equal or less than this key.
|
boolean |
isEnableQuickLookup() |
boolean |
remove(long key) |
boolean |
removeAll(long age)
Expects a sorted (ascending) list of cut-entries that should be removed.
|
void |
setEnableQuickLookup(boolean enableQuickLookup) |
int |
size() |
public HorizontalPositionsList()
public HorizontalPositionsList(int increment, boolean enableQuickLookup)
public void clear()
public boolean isEnableQuickLookup()
public void setEnableQuickLookup(boolean enableQuickLookup)
public int size()
public void ensureCapacity(int c)
c
elements. This method does nothing, if the new
capacity is less than the current capacity.c
- the new capacity of the list.public long getAge(long key)
public boolean add(long key, long age)
public boolean remove(long key)
public long getNext(long key)
public long getPrevious(long key)
key
- public boolean containsKey(long key)
public long[] getKeys()
public long[] getKeys(long[] retval)
public int findKeyPosition(long coordinate, boolean greater)
coordinate
- greater
- public long getKeyAt(int indexPosition)
public long findKey(long key, boolean upperBounds)
public boolean removeAll(long age)
age
- the age. All keys with a age smaller than that will be eliminated.Copyright © 2002–2017 Pentaho Corporation. All rights reserved.