public static <T>String path(TreeDef.Parented<T> treeDef,T node,Function<? super T,String> toString,String delimiter){
  List<T> toRoot=toRoot(treeDef,node);
  ListIterator<T> iterator=toRoot.listIterator(toRoot.size());
  StringBuilder builder=new StringBuilder();
  while (iterator.hasPrevious()) {
    T segment=iterator.previous();
    builder.append(toString.apply(segment));
    if (iterator.hasPrevious()) {
      builder.append(delimiter);
    }
  }
  return builder.toString();
}

public static < T > String path ( TreeDef . Parented < T > treeDef , T node , Function < ? super T , String > toString , String delimiter ) { List < T > toRoot = toRoot ( treeDef , node ) ; ListIterator < T > iterator = toRoot . listIterator ( toRoot . size ( ) ) ; StringBuilder builder = new StringBuilder ( ) ; while ( iterator . hasPrevious ( ) ) { T segment = iterator . previous ( ) ; builder . append ( toString . apply ( segment ) ) ; if ( iterator . hasPrevious ( ) ) { builder . append ( delimiter ) ; } } return builder . toString ( ) ; }
returns the path of the given node .
