Class WildcardTermEnum

  • All Implemented Interfaces:
    Closeable, AutoCloseable

    public class WildcardTermEnum
    extends FilteredTermEnum
    Subclass of FilteredTermEnum for enumerating all terms that match the specified wildcard filter term.

    Term enumerations are always ordered by Term.compareTo(). Each term in the enumeration is greater than all that precede it.

    • Field Detail

      • WILDCARD_STRING

        public static final char WILDCARD_STRING
        String equality with support for wildcards
        See Also:
        Constant Field Values
    • Constructor Detail

      • WildcardTermEnum

        public WildcardTermEnum​(IndexReader reader,
                                Term term)
                         throws IOException
        Creates a new WildcardTermEnum.

        After calling the constructor the enumeration is already pointing to the first valid term if such a term exists.

        Throws:
        IOException
    • Method Detail

      • endEnum

        public final boolean endEnum()
        Description copied from class: FilteredTermEnum
        Indicates the end of the enumeration has been reached
        Specified by:
        endEnum in class FilteredTermEnum
      • wildcardEquals

        public static final boolean wildcardEquals​(String pattern,
                                                   int patternIdx,
                                                   String string,
                                                   int stringIdx)
        Determines if a word matches a wildcard pattern. Work released by Granta Design Ltd after originally being done on company time.