public final String toString(){
  StringBuilder buf=new StringBuilder();
  Endpoint endptTypeA=getEndpoint1();
  Endpoint endptTypeB=getEndpoint2();
  buf.append(getNode1());
  buf.append(" ");
  if (endptTypeA == Endpoint.TAIL) {
    buf.append("-");
  }
 else   if (endptTypeA == Endpoint.ARROW) {
    buf.append("<");
  }
 else   if (endptTypeA == Endpoint.CIRCLE) {
    buf.append("o");
  }
  buf.append("-");
  if (endptTypeB == Endpoint.TAIL) {
    buf.append("-");
  }
 else   if (endptTypeB == Endpoint.ARROW) {
    buf.append(">");
  }
 else   if (endptTypeB == Endpoint.CIRCLE) {
    buf.append("o");
  }
  buf.append(" ");
  buf.append(getNode2());
  return buf.toString();
}

public final String toString ( ) { StringBuilder buf = new StringBuilder ( ) ; Endpoint endptTypeA = getEndpoint1 ( ) ; Endpoint endptTypeB = getEndpoint2 ( ) ; buf . append ( getNode1 ( ) ) ; buf . append ( " " ) ; if ( endptTypeA == Endpoint . TAIL ) { buf . append ( "-" ) ; } else if ( endptTypeA == Endpoint . ARROW ) { buf . append ( "<" ) ; } else if ( endptTypeA == Endpoint . CIRCLE ) { buf . append ( "o" ) ; } buf . append ( "-" ) ; if ( endptTypeB == Endpoint . TAIL ) { buf . append ( "-" ) ; } else if ( endptTypeB == Endpoint . ARROW ) { buf . append ( ">" ) ; } else if ( endptTypeB == Endpoint . CIRCLE ) { buf . append ( "o" ) ; } buf . append ( " " ) ; buf . append ( getNode2 ( ) ) ; return buf . toString ( ) ; }
produces a string representation of the edge .
