Class PathBuilder


  • public final class PathBuilder
    extends java.lang.Object
    The PathBuilder offers a convenient way of creating a valid path from multiple fragments
    Since:
    1.0.0 (Sling API Bundle 2.11.0)
    • Constructor Summary

      Constructors 
      Constructor Description
      PathBuilder​(java.lang.String path)
      Creates a new PathBuilder instance
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      PathBuilder append​(java.lang.String path)
      Appends a new path fragment
      java.lang.String toString()
      Returns the path
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • PathBuilder

        public PathBuilder​(java.lang.String path)
        Creates a new PathBuilder instance
        Parameters:
        path - the initial path
    • Method Detail

      • append

        public PathBuilder append​(java.lang.String path)
        Appends a new path fragment
        Parameters:
        path - the path fragment to append
        Returns:
        this instance
      • toString

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