private String concat(List<ILineSegment> list){
  StringBuilder res=new StringBuilder();
  Node<ILineSegment> n=list.head();
  while (n != null) {
    res.append(n.value());
    n=n.next();
    if (n != null) {
      res.append(",");
    }
  }
  return res.toString();
}

private String concat ( List < ILineSegment > list ) { StringBuilder res = new StringBuilder ( ) ; Node < ILineSegment > n = list . head ( ) ; while ( n != null ) { res . append ( n . value ( ) ) ; n = n . next ( ) ; if ( n != null ) { res . append ( "," ) ; } } return res . toString ( ) ; }
helper for tostring in concatenating lists .
