Class RegexPathSpec

    • Field Detail

      • pattern

        protected Pattern pattern
    • Constructor Detail

      • RegexPathSpec

        protected RegexPathSpec()
      • RegexPathSpec

        public RegexPathSpec​(String regex)
    • Method Detail

      • getPathInfo

        public String getPathInfo​(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 String getPathMatch​(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 Pattern getPattern()
      • getRelativePath

        public String getRelativePath​(String base,
                                      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​(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