public class SearchTree<T> extends java.lang.Object implements ISearchTree<T>
Modifier and Type | Class and Description |
---|---|
(package private) static class |
SearchTree.MergingIterator<T> |
Modifier and Type | Field and Description |
---|---|
protected SuffixArray<T> |
byId |
protected SuffixArray<T> |
byName |
private java.util.List<T> |
contents |
private java.util.function.Function<T,java.lang.Iterable<ResourceLocation>> |
idFunc |
private java.util.function.Function<T,java.lang.Iterable<java.lang.String>> |
nameFunc |
private it.unimi.dsi.fastutil.objects.Object2IntMap<T> |
numericContents |
Constructor and Description |
---|
SearchTree(java.util.function.Function<T,java.lang.Iterable<java.lang.String>> nameFuncIn,
java.util.function.Function<T,java.lang.Iterable<ResourceLocation>> idFuncIn) |
Modifier and Type | Method and Description |
---|---|
void |
add(T element) |
private void |
index(T element) |
void |
recalculate() |
java.util.List<T> |
search(java.lang.String searchText) |
protected SuffixArray<T> byId
protected SuffixArray<T> byName
private final java.util.function.Function<T,java.lang.Iterable<java.lang.String>> nameFunc
private final java.util.function.Function<T,java.lang.Iterable<ResourceLocation>> idFunc
private final java.util.List<T> contents
private it.unimi.dsi.fastutil.objects.Object2IntMap<T> numericContents
public SearchTree(java.util.function.Function<T,java.lang.Iterable<java.lang.String>> nameFuncIn, java.util.function.Function<T,java.lang.Iterable<ResourceLocation>> idFuncIn)