class Path implements Comparable, Serializable, ObjectInputValidation {

  public static Path mergePaths(Path path1, Path path2) {
    String path2Str = path2.toUri().getPath();
    path2Str = path2Str.substring(startPositionWithoutWindowsDrive(path2Str));
    // Add path components explicitly, because simply concatenating two path
    // string is not safe, for example:
    // "/" + "/foo" yields "//foo", which will be parsed as authority in Path
    return new Path(path1.toUri().getScheme(), 
        path1.toUri().getAuthority(), 
        path1.toUri().getPath() + path2Str);
  }

  public  Path(String parent, String child);
  public  Path(Path parent, String child);
  public  Path(String parent, Path child);
  public  Path(Path parent, Path child);
  public  Path(String pathString);
  public  Path(URI aUri);
  public  Path(String scheme, String authority, String path);

}