Class AbstractPatternTextFilter

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.regex.Pattern filterPattern  
      protected java.lang.String filterText  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractPatternTextFilter​(java.lang.String filterText)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract java.util.regex.Pattern createPattern()
      Subclasses must create the Pattern that will be used by this class when filtering.
      boolean equals​(java.lang.Object obj)  
      java.lang.String getFilterText()  
      int hashCode()  
      boolean matches​(java.lang.String text)  
      abstract boolean matches​(java.lang.String text, java.util.regex.Pattern pattern)
      Subclasses implement this method for their usage of the given pattern (find vs.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • filterText

        protected final java.lang.String filterText
      • filterPattern

        protected java.util.regex.Pattern filterPattern
    • Constructor Detail

      • AbstractPatternTextFilter

        protected AbstractPatternTextFilter​(java.lang.String filterText)
    • Method Detail

      • createPattern

        protected abstract java.util.regex.Pattern createPattern()
        Subclasses must create the Pattern that will be used by this class when filtering.
        Returns:
        the pattern
      • matches

        public abstract boolean matches​(java.lang.String text,
                                        java.util.regex.Pattern pattern)
        Subclasses implement this method for their usage of the given pattern (find vs. matches)
        Parameters:
        text - the text to check against the pattern
        pattern - the pattern used to match the text
        Returns:
        true if there is a match
      • matches

        public boolean matches​(java.lang.String text)
        Specified by:
        matches in interface TextFilter
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object