Class MatchPattern


  • @Deprecated
    public class MatchPattern
    extends java.lang.Object
    Deprecated.
    use java.nio.filejava.nio.file.DirectoryStream.Filter<T> and related classes
    Describes a match target for SelectorUtils.

    Significantly more efficient than using strings, since re-evaluation and re-tokenizing is avoided.

    Author:
    Kristian Rosenvold
    • Method Detail

      • matchPath

        public boolean matchPath​(java.lang.String str,
                                 boolean isCaseSensitive)
        Deprecated.
        Parameters:
        str - The string to match for.
        isCaseSensitive - case sensitive true false otherwise.
        Returns:
        true if matches false otherwise.
      • matchPatternStart

        public boolean matchPatternStart​(@Nonnull
                                         java.lang.String str,
                                         boolean isCaseSensitive)
        Deprecated.
        Parameters:
        str - The string to check.
        isCaseSensitive - Check case sensitive or not.
        Returns:
        true in case of matching pattern.
      • getTokenizedPathString

        public java.lang.String[] getTokenizedPathString()
        Deprecated.
        Returns:
        Tokenized string.
      • startsWith

        public boolean startsWith​(java.lang.String string)
        Deprecated.
        Parameters:
        string - The part which will be checked to start with.
        Returns:
        true in case of starting with the string false otherwise.
      • fromString

        public static MatchPattern fromString​(java.lang.String source)
        Deprecated.
        Parameters:
        source - The source.
        Returns:
        The match pattern.