public abstract class SearchTree<TKey,TValue>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected class |
SearchTree.ValueComparer
Compares values (referenced by ID) by priority.
|
Modifier and Type | Field and Description |
---|---|
protected SearchTree.ValueComparer |
comparer |
protected int |
currentID |
protected java.util.Map<java.lang.Integer,TValue> |
flatten |
protected java.util.Map<java.lang.Integer,java.lang.Integer> |
paramCount |
Constructor and Description |
---|
SearchTree() |
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(TKey element) |
TValue |
get(java.lang.Integer id) |
TValue |
get(TKey element) |
java.util.List<TValue> |
getAllRanked(TKey element) |
java.util.List<java.lang.Integer> |
getAllRankedID(TKey element) |
protected abstract java.util.Set<java.lang.Integer> |
getFromParameters(TKey source) |
java.util.Collection<TValue> |
getValues()
Returns a list of every stored value in this search tree.
|
java.lang.Integer |
put(TKey element,
TValue value) |
void |
putAll(SearchTree<TKey,TValue> other) |
protected abstract void |
putAllParameters(SearchTree<TKey,TValue> other,
java.lang.Integer offset) |
protected abstract java.lang.Integer |
putFromParameters(TKey source,
java.lang.Integer id) |
protected java.util.Map<java.lang.Integer,TValue> flatten
protected java.util.Map<java.lang.Integer,java.lang.Integer> paramCount
protected int currentID
protected SearchTree.ValueComparer comparer
public void putAll(SearchTree<TKey,TValue> other)
public TValue get(java.lang.Integer id)
public java.util.List<java.lang.Integer> getAllRankedID(TKey element)
public boolean containsKey(TKey element)
public java.util.Collection<TValue> getValues()
protected abstract void putAllParameters(SearchTree<TKey,TValue> other, java.lang.Integer offset)
protected abstract java.lang.Integer putFromParameters(TKey source, java.lang.Integer id)
protected abstract java.util.Set<java.lang.Integer> getFromParameters(TKey source)