Class RegexPathSpec

    • Field Detail

      • pattern

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

      • RegexPathSpec

        protected RegexPathSpec()
      • RegexPathSpec

        public RegexPathSpec​(java.lang.String regex)
    • Method Detail

      • getMatcher

        public java.util.regex.Matcher getMatcher​(java.lang.String path)
      • getPathInfo

        public java.lang.String getPathInfo​(java.lang.String path)
        Description copied from class: PathSpec
        Return the portion of the path that is after the path spec.
        Specified by:
        getPathInfo in class PathSpec
        Parameters:
        path - the path to match against
        Returns:
        the path info portion of the string
      • getPathMatch

        public java.lang.String getPathMatch​(java.lang.String path)
        Description copied from class: PathSpec
        Return the portion of the path that matches a path spec.
        Specified by:
        getPathMatch in class PathSpec
        Parameters:
        path - the path to match against
        Returns:
        the match, or null if no match at all
      • getPattern

        public java.util.regex.Pattern getPattern()
      • getRelativePath

        public java.lang.String getRelativePath​(java.lang.String base,
                                                java.lang.String path)
        Description copied from class: PathSpec
        Get the relative path.
        Specified by:
        getRelativePath in class PathSpec
        Parameters:
        base - the base the path is relative to
        path - the additional path
        Returns:
        the base plus path with pathSpec portion removed
      • matches

        public boolean matches​(java.lang.String path)
        Description copied from class: PathSpec
        Test to see if the provided path matches this path spec
        Specified by:
        matches in class PathSpec
        Parameters:
        path - the path to test
        Returns:
        true if the path matches this path spec, false otherwise