public class DataTreeImpl<K,V> implements DataTree<K,V>
An AVL tree which assumes that it's accessed only from a single thread at the time and that the access is iteration-like:
getPreviousKey (returns, say, k1)
getNextKey (returns k2)
getNextKey (returns k3)
getNextKey (returns k4)
etc
It caches last call's results and tries re-using them on subsequent calls.
getPreviousKey,
getNextKey,
getNextKey,
getNextKey| Modifier and Type | Class and Description |
|---|---|
static class |
DataTreeImpl.Companion |
| Modifier and Type | Field and Description |
|---|---|
static DataTreeImpl.Companion |
Companion |
| Constructor and Description |
|---|
DataTreeImpl(java.util.Comparator<K> comparator)
An AVL tree which assumes that it's accessed only from a single thread at the time and that the access
is iteration-like:
|
| Modifier and Type | Method and Description |
|---|---|
V |
get(K key) |
boolean |
getEmpty() |
V |
getFirst() |
java.util.Set<K> |
getKeys() |
V |
getLast() |
kotlin.jvm.functions.Function1<java.lang.String,kotlin.Unit> |
getLog() |
K |
getNextKey(K key) |
V |
getNextValue(K key) |
K |
getPreviousKey(K key) |
V |
getPreviousValue(K key) |
void |
put(K key,
V value) |
V |
remove(K key) |
void |
removeGreaterThen(K key) |
void |
removeLowerThen(K key) |
void |
setLog(kotlin.jvm.functions.Function1<? super java.lang.String,kotlin.Unit> p) |
get, getEmpty, getFirst, getKeys, getLast, getNextKey, getNextValue, getPreviousKey, getPreviousValue, put, remove, removeGreaterThen, removeLowerThenpublic static DataTreeImpl.Companion Companion
public DataTreeImpl(@NotNull
java.util.Comparator<K> comparator)
An AVL tree which assumes that it's accessed only from a single thread at the time and that the access is iteration-like:
getPreviousKey (returns, say, k1)
getNextKey (returns k2)
getNextKey (returns k3)
getNextKey (returns k4)
etc
It caches last call's results and tries re-using them on subsequent calls.
getPreviousKey,
getNextKey,
getNextKey,
getNextKey@NotNull public kotlin.jvm.functions.Function1<java.lang.String,kotlin.Unit> getLog()
public void setLog(@NotNull
kotlin.jvm.functions.Function1<? super java.lang.String,kotlin.Unit> p)
public boolean getEmpty()
@NotNull public java.util.Set<K> getKeys()
@Nullable public V getFirst()
@Nullable public V getLast()
@Nullable public V get(K key)
@Nullable public K getPreviousKey(K key)
@Nullable public V getPreviousValue(K key)
@Nullable public K getNextKey(K key)
@Nullable public V getNextValue(K key)
public void put(K key,
V value)
public void removeLowerThen(K key)
@Nullable public V remove(K key)
public void removeGreaterThen(K key)