class Path implements Iterable<ChildKey>, Comparable<Path> {

  public String wireFormat() {
    if (this.isEmpty()) {
      return "/";
    } else {
      StringBuilder builder = new StringBuilder();
      for (int i = this.start; i < this.end; i++) {
        if (i > this.start) {
          builder.append("/");
        }
        builder.append(pieces[i].asString());
      }
      return builder.toString();
    }
  }

  public  Path(ChildKey... segments);
  public  Path(List<String> segments);
  public  Path(String pathString);
  private  Path(ChildKey[] pieces, int start, int end);

}