Class URIPath


  • public class URIPath
    extends java.lang.Object
    Simple builder class for URI paths.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.LinkedList<java.lang.String> path  
    • Constructor Summary

      Constructors 
      Constructor Description
      URIPath()  
      URIPath​(java.lang.String... pathParts)  
      URIPath​(java.util.List<java.lang.String> pathParts)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      URIPath append​(java.lang.String... pathParts)  
      URIPath append​(java.util.List<java.lang.String> pathParts)  
      java.lang.String build()
      Create a valid escaped path string.
      URIPath clear()  
      URIPath prepend​(java.lang.String... pathParts)  
      URIPath prepend​(java.util.List<java.lang.String> pathParts)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • path

        protected final java.util.LinkedList<java.lang.String> path
    • Constructor Detail

      • URIPath

        public URIPath()
      • URIPath

        public URIPath​(java.util.List<java.lang.String> pathParts)
      • URIPath

        public URIPath​(java.lang.String... pathParts)
    • Method Detail

      • append

        public URIPath append​(java.util.List<java.lang.String> pathParts)
        Parameters:
        pathParts - Path fragments to add to the back of the path.
        Returns:
        this
      • append

        public URIPath append​(java.lang.String... pathParts)
        Parameters:
        pathParts - Path fragments to add to the back of the path.
        Returns:
        this
      • prepend

        public URIPath prepend​(java.util.List<java.lang.String> pathParts)
        Parameters:
        pathParts - Path fragments to add to the front of the path.
        Returns:
        this
      • prepend

        public URIPath prepend​(java.lang.String... pathParts)
        Parameters:
        pathParts - Path fragments to add to the front of the path.
        Returns:
        this
      • build

        public java.lang.String build()
        Create a valid escaped path string.
        Returns:
        The encoded path without a leading '/'.