Javadoc
A Utility class to concatenate path fragments without having to worry about trailing and leading slashes.
This class just takes care of path separators, it doesn't assume or change anything related to URL or Filename encoding.
Trailing slashes at the end of the path are preserved.
All of the following calls lead to the same result, http://example.com/path.
new PathBuilder("http://example.com").withPathFragment("/path").build()
new PathBuilder("http://example.com/").withPathFragment("/path").build()
new PathBuilder("http://example.com/").withPathFragment("path").build()
new PathBuilder("http://example.com").withPathFragment("path").build()