类 SuffixArray<T>


  • @Environment(CLIENT)
    public class SuffixArray<T>
    extends Object
    Provides an efficient way to search for a text in multiple texts.
    Mappings:
    Namespace Name
    official eze
    intermediary net/minecraft/class_1128
    named net/minecraft/client/search/SuffixArray
    • 字段详细资料

      • PRINT_COMPARISONS

        private static final boolean PRINT_COMPARISONS
        Mappings:
        Namespace Name Mixin selector
        official b Leze;b:Z
        intermediary field_5508 Lnet/minecraft/class_1128;field_5508:Z
        named PRINT_COMPARISONS Lnet/minecraft/client/search/SuffixArray;PRINT_COMPARISONS:Z
      • PRINT_ARRAY

        private static final boolean PRINT_ARRAY
        Mappings:
        Namespace Name Mixin selector
        official c Leze;c:Z
        intermediary field_5507 Lnet/minecraft/class_1128;field_5507:Z
        named PRINT_ARRAY Lnet/minecraft/client/search/SuffixArray;PRINT_ARRAY:Z
      • LOGGER

        private static final Logger LOGGER
        Mappings:
        Namespace Name Mixin selector
        official d Leze;d:Lorg/apache/logging/log4j/Logger;
        intermediary field_5510 Lnet/minecraft/class_1128;field_5510:Lorg/apache/logging/log4j/Logger;
        named LOGGER Lnet/minecraft/client/search/SuffixArray;LOGGER:Lorg/apache/logging/log4j/Logger;
      • field_33013

        private static final int field_33013
        另请参阅:
        常量字段值
        Mappings:
        Namespace Name Mixin selector
        official e Leze;e:I
        intermediary field_33013 Lnet/minecraft/class_1128;field_33013:I
        named field_33013 Lnet/minecraft/client/search/SuffixArray;field_33013:I
      • field_33014

        private static final int field_33014
        另请参阅:
        常量字段值
        Mappings:
        Namespace Name Mixin selector
        official f Leze;f:I
        intermediary field_33014 Lnet/minecraft/class_1128;field_33014:I
        named field_33014 Lnet/minecraft/client/search/SuffixArray;field_33014:I
      • objects

        protected final List<T> objects
        Mappings:
        Namespace Name Mixin selector
        official a Leze;a:Ljava/util/List;
        intermediary field_5503 Lnet/minecraft/class_1128;field_5503:Ljava/util/List;
        named objects Lnet/minecraft/client/search/SuffixArray;objects:Ljava/util/List;
      • characters

        private final IntList characters
        Mappings:
        Namespace Name Mixin selector
        official g Leze;g:Lit/unimi/dsi/fastutil/ints/IntList;
        intermediary field_5505 Lnet/minecraft/class_1128;field_5505:Lit/unimi/dsi/fastutil/ints/IntList;
        named characters Lnet/minecraft/client/search/SuffixArray;characters:Lit/unimi/dsi/fastutil/ints/IntList;
      • textStarts

        private final IntList textStarts
        Mappings:
        Namespace Name Mixin selector
        official h Leze;h:Lit/unimi/dsi/fastutil/ints/IntList;
        intermediary field_5509 Lnet/minecraft/class_1128;field_5509:Lit/unimi/dsi/fastutil/ints/IntList;
        named textStarts Lnet/minecraft/client/search/SuffixArray;textStarts:Lit/unimi/dsi/fastutil/ints/IntList;
      • suffixIndexToObjectIndex

        private IntList suffixIndexToObjectIndex
        Mappings:
        Namespace Name Mixin selector
        official i Leze;i:Lit/unimi/dsi/fastutil/ints/IntList;
        intermediary field_5504 Lnet/minecraft/class_1128;field_5504:Lit/unimi/dsi/fastutil/ints/IntList;
        named suffixIndexToObjectIndex Lnet/minecraft/client/search/SuffixArray;suffixIndexToObjectIndex:Lit/unimi/dsi/fastutil/ints/IntList;
      • offsetInText

        private IntList offsetInText
        Mappings:
        Namespace Name Mixin selector
        official j Leze;j:Lit/unimi/dsi/fastutil/ints/IntList;
        intermediary field_5506 Lnet/minecraft/class_1128;field_5506:Lit/unimi/dsi/fastutil/ints/IntList;
        named offsetInText Lnet/minecraft/client/search/SuffixArray;offsetInText:Lit/unimi/dsi/fastutil/ints/IntList;
      • maxTextLength

        private int maxTextLength
        Mappings:
        Namespace Name Mixin selector
        official k Leze;k:I
        intermediary field_5502 Lnet/minecraft/class_1128;field_5502:I
        named maxTextLength Lnet/minecraft/client/search/SuffixArray;maxTextLength:I
    • 构造器详细资料

      • SuffixArray

        public SuffixArray()
    • 方法详细资料

      • add

        public void add​(T object,
                        String text)
        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
        official a Leze;a(Ljava/lang/Object;Ljava/lang/String;)V
        intermediary method_4806 Lnet/minecraft/class_1128;method_4806(Ljava/lang/Object;Ljava/lang/String;)V
        named add Lnet/minecraft/client/search/SuffixArray;add(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
        official a Leze;a()V
        intermediary method_4807 Lnet/minecraft/class_1128;method_4807()V
        named build Lnet/minecraft/client/search/SuffixArray;build()V
      • printArray

        private void printArray()
        Mappings:
        Namespace Name Mixin selector
        official b Leze;b()V
        intermediary method_4809 Lnet/minecraft/class_1128;method_4809()V
        named printArray Lnet/minecraft/client/search/SuffixArray;printArray()V
      • getDebugString

        private String getDebugString​(int suffixIndex)
        Mappings:
        Namespace Name Mixin selector
        official a Leze;a(I)Ljava/lang/String;
        intermediary method_4808 Lnet/minecraft/class_1128;method_4808(I)Ljava/lang/String;
        named getDebugString Lnet/minecraft/client/search/SuffixArray;getDebugString(I)Ljava/lang/String;
      • compare

        private int compare​(String string,
                            int suffixIndex)
        Mappings:
        Namespace Name Mixin selector
        official a Leze;a(Ljava/lang/String;I)I
        intermediary method_4805 Lnet/minecraft/class_1128;method_4805(Ljava/lang/String;I)I
        named compare Lnet/minecraft/client/search/SuffixArray;compare(Ljava/lang/String;I)I
      • findAll

        public List<T> findAll​(String text)
        Retrieves all objects of which corresponding texts contain text.

        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 of text in all texts added, and Y is the number of found objects.

        Mappings:
        Namespace Name Mixin selector
        official a Leze;a(Ljava/lang/String;)Ljava/util/List;
        intermediary method_4804 Lnet/minecraft/class_1128;method_4804(Ljava/lang/String;)Ljava/util/List;
        named findAll Lnet/minecraft/client/search/SuffixArray;findAll(Ljava/lang/String;)Ljava/util/List;