public class SearchTreeReloadable<T> extends java.lang.Object implements IMutableSearchTree<T>
| 修飾子とタイプ | クラスと説明 |
|---|---|
static class |
SearchTreeReloadable.JoinedIterator<T> |
| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected SuffixArray<T> |
namespaceList |
protected SuffixArray<T> |
pathList |
| コンストラクタと説明 |
|---|
SearchTreeReloadable(java.util.function.Function<T,java.util.stream.Stream<ResourceLocation>> p_i50896_1_) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
void |
clear() |
protected int |
compare(T p_217874_1_,
T p_217874_2_)
Compares two elements.
|
void |
func_217872_a(T element) |
protected void |
index(T element)
Directly puts the given item into
#byId and #byName, applying #nameFunc and idFunc. |
void |
recalculate()
Recalculates the contents of this search tree, reapplying
#nameFunc and #idFunc. |
java.util.List<T> |
search(java.lang.String searchText)
Searches this search tree for the given text.
|
protected SuffixArray<T> namespaceList
protected SuffixArray<T> pathList
public SearchTreeReloadable(java.util.function.Function<T,java.util.stream.Stream<ResourceLocation>> p_i50896_1_)
public void recalculate()
#nameFunc and #idFunc. Should be called
whenever resources are reloaded (e.g. language changes).recalculate インタフェース内 IMutableSearchTree<T>public void func_217872_a(T element)
func_217872_a インタフェース内 IMutableSearchTree<T>public void clear()
clear インタフェース内 IMutableSearchTree<T>protected void index(T element)
#byId and #byName, applying #nameFunc and idFunc.protected int compare(T p_217874_1_, T p_217874_2_)
1 if the first element has more entries, 0 if they have the same
number of entries, and -1 if the second element has more enties.public java.util.List<T> search(java.lang.String searchText)
If the query does not contain a :, then only #byName is searched; if it does contain a colon,
both #byName and #byId are searched and the results are merged using a MergingIterator.
search インタフェース内 ISearchTree<T>