public void connectEndToEnd ( SGraphSegment segment ) { if ( segment . getGraph ( ) != getGraph ( ) ) { throw new IllegalArgumentException ( ) ; } final SGraphPoint point = new SGraphPoint ( getGraph ( ) ) ; setEnd ( point ) ; segment . setEnd ( point ) ; final SGraph g = getGraph ( ) ; assert g != null ; g . updatePointCount ( - 1 ) ; }
Connect the end point of this segment to the end point of the given segment . This function change the connection points of the two segments .