Class WildcardTerm

  • All Implemented Interfaces:
    TokenAnnotationSet, java.io.Serializable, java.lang.Cloneable

    public final class WildcardTerm
    extends PhraseTerm
    Phrase that matches all terms that match a wildcard expression.
    See Also:
    Serialized Form
    • Constructor Detail

      • WildcardTerm

        public WildcardTerm()
        Constructor
      • WildcardTerm

        public WildcardTerm​(java.lang.String text)
        Constructor
      • WildcardTerm

        public WildcardTerm​(java.lang.String text,
                            TokenAnnotation annotation)
        Constructor
      • WildcardTerm

        public WildcardTerm​(java.lang.String text,
                            TokenAnnotation... annotation)
        Constructor
      • WildcardTerm

        public WildcardTerm​(SearchTerm term)
        Constructor
    • Method Detail

      • getText

        public java.lang.String getText()
      • setText

        public void setText​(java.lang.String value)
      • isMatchAll

        public boolean isMatchAll()
        Returns true if this phrase will match all documents.
        Overrides:
        isMatchAll in class Phrase
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class PhraseTerm
      • toString

        public void toString​(java.lang.StringBuilder buffer,
                             boolean compact)
        Appends the string representation of this query to buffer.
        Specified by:
        toString in class Phrase
      • matchAll

        public static WildcardTerm matchAll()
        Create a wildcard term that matches all documents.
      • isMatchAll

        public static boolean isMatchAll​(java.lang.String text)
        Check if text is a wildcard that matches everything.
      • containsWildcard

        public static boolean containsWildcard​(java.lang.String text)
        Check if text contains any wildcard characters.