Package net.minecraft.client.search
Class SuffixArray<T>
java.lang.Object
net.minecraft.client.search.SuffixArray<T>
Provides an efficient way to search for a text in multiple texts.
- Mappings:
Namespace Name named net/minecraft/client/search/SuffixArrayintermediary net/minecraft/class_1128official gul
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a text with the corresponding object.voidbuild()Builds a suffix array with added texts.private intRetrieves all objects of which corresponding texts containtext.private StringgetDebugString(int suffixIndex) private void
-
Field Details
-
PRINT_COMPARISONS
private static final boolean PRINT_COMPARISONS- Mappings:
Namespace Name Mixin selector named PRINT_COMPARISONSLnet/minecraft/client/search/SuffixArray;PRINT_COMPARISONS:Zintermediary field_5508Lnet/minecraft/class_1128;field_5508:Zofficial bLgul;b:Z
-
PRINT_ARRAY
private static final boolean PRINT_ARRAY- Mappings:
Namespace Name Mixin selector named PRINT_ARRAYLnet/minecraft/client/search/SuffixArray;PRINT_ARRAY:Zintermediary field_5507Lnet/minecraft/class_1128;field_5507:Zofficial cLgul;c:Z
-
LOGGER
- Mappings:
Namespace Name Mixin selector named LOGGERLnet/minecraft/client/search/SuffixArray;LOGGER:Lorg/slf4j/Logger;intermediary field_5510Lnet/minecraft/class_1128;field_5510:Lorg/slf4j/Logger;official dLgul;d:Lorg/slf4j/Logger;
-
field_33013
private static final int field_33013- See Also:
- Mappings:
Namespace Name Mixin selector named field_33013Lnet/minecraft/client/search/SuffixArray;field_33013:Iintermediary field_33013Lnet/minecraft/class_1128;field_33013:Iofficial eLgul;e:I
-
field_33014
private static final int field_33014- See Also:
- Mappings:
Namespace Name Mixin selector named field_33014Lnet/minecraft/client/search/SuffixArray;field_33014:Iintermediary field_33014Lnet/minecraft/class_1128;field_33014:Iofficial fLgul;f:I
-
objects
- Mappings:
Namespace Name Mixin selector named objectsLnet/minecraft/client/search/SuffixArray;objects:Ljava/util/List;intermediary field_5503Lnet/minecraft/class_1128;field_5503:Ljava/util/List;official aLgul;a:Ljava/util/List;
-
characters
- Mappings:
Namespace Name Mixin selector named charactersLnet/minecraft/client/search/SuffixArray;characters:Lit/unimi/dsi/fastutil/ints/IntList;intermediary field_5505Lnet/minecraft/class_1128;field_5505:Lit/unimi/dsi/fastutil/ints/IntList;official gLgul;g:Lit/unimi/dsi/fastutil/ints/IntList;
-
textStarts
- Mappings:
Namespace Name Mixin selector named textStartsLnet/minecraft/client/search/SuffixArray;textStarts:Lit/unimi/dsi/fastutil/ints/IntList;intermediary field_5509Lnet/minecraft/class_1128;field_5509:Lit/unimi/dsi/fastutil/ints/IntList;official hLgul;h:Lit/unimi/dsi/fastutil/ints/IntList;
-
suffixIndexToObjectIndex
- Mappings:
Namespace Name Mixin selector named suffixIndexToObjectIndexLnet/minecraft/client/search/SuffixArray;suffixIndexToObjectIndex:Lit/unimi/dsi/fastutil/ints/IntList;intermediary field_5504Lnet/minecraft/class_1128;field_5504:Lit/unimi/dsi/fastutil/ints/IntList;official iLgul;i:Lit/unimi/dsi/fastutil/ints/IntList;
-
offsetInText
- Mappings:
Namespace Name Mixin selector named offsetInTextLnet/minecraft/client/search/SuffixArray;offsetInText:Lit/unimi/dsi/fastutil/ints/IntList;intermediary field_5506Lnet/minecraft/class_1128;field_5506:Lit/unimi/dsi/fastutil/ints/IntList;official jLgul;j:Lit/unimi/dsi/fastutil/ints/IntList;
-
maxTextLength
private int maxTextLength- Mappings:
Namespace Name Mixin selector named maxTextLengthLnet/minecraft/client/search/SuffixArray;maxTextLength:Iintermediary field_5502Lnet/minecraft/class_1128;field_5502:Iofficial kLgul;k:I
-
-
Constructor Details
-
SuffixArray
public SuffixArray()
-
-
Method Details
-
add
Adds a text with the corresponding object.You are not allowed to call this method after calling
build()method.Takes O(
text.length()) time.- Mappings:
Namespace Name Mixin selector named addLnet/minecraft/client/search/SuffixArray;add(Ljava/lang/Object;Ljava/lang/String;)Vintermediary method_4806Lnet/minecraft/class_1128;method_4806(Ljava/lang/Object;Ljava/lang/String;)Vofficial aLgul;a(Ljava/lang/Object;Ljava/lang/String;)V
-
build
public void build()Builds a suffix array with added texts.You are not allowed to call this method multiple times.
Takes O(N * log N * log M) time on average where N is the sum of all text length added, and M is the maximum text length added.
- Mappings:
Namespace Name Mixin selector named buildLnet/minecraft/client/search/SuffixArray;build()Vintermediary method_4807Lnet/minecraft/class_1128;method_4807()Vofficial aLgul;a()V
-
printArray
private void printArray()- Mappings:
Namespace Name Mixin selector named printArrayLnet/minecraft/client/search/SuffixArray;printArray()Vintermediary method_4809Lnet/minecraft/class_1128;method_4809()Vofficial bLgul;b()V
-
getDebugString
- Mappings:
Namespace Name Mixin selector named getDebugStringLnet/minecraft/client/search/SuffixArray;getDebugString(I)Ljava/lang/String;intermediary method_4808Lnet/minecraft/class_1128;method_4808(I)Ljava/lang/String;official aLgul;a(I)Ljava/lang/String;
-
compare
- Mappings:
Namespace Name Mixin selector named compareLnet/minecraft/client/search/SuffixArray;compare(Ljava/lang/String;I)Iintermediary method_4805Lnet/minecraft/class_1128;method_4805(Ljava/lang/String;I)Iofficial aLgul;a(Ljava/lang/String;I)I
-
findAll
Retrieves all objects of which corresponding texts containtext.You have to call
build()method before calling this method.Takes O(
text.length()* log N) time to find objects where N is the sum of all text length added. Takes O(X + Y * log Y) time to collect found objects into a list where X is the number of occurrences oftextin all texts added, and Y is the number of found objects.- Mappings:
Namespace Name Mixin selector named findAllLnet/minecraft/client/search/SuffixArray;findAll(Ljava/lang/String;)Ljava/util/List;intermediary method_4804Lnet/minecraft/class_1128;method_4804(Ljava/lang/String;)Ljava/util/List;official aLgul;a(Ljava/lang/String;)Ljava/util/List;
-