code: public void connectBeginToBegin(SGraphSegment segment) {
  		if (segment.getGraph() != getGraph()) {
  			throw new IllegalArgumentException();
  		}
  		final SGraphPoint point = new SGraphPoint(getGraph());
  		setBegin(point);
  		segment.setBegin(point);
  
  		final SGraph g = getGraph();
  		assert g != null;
  		g.updatePointCount(-1);
  	}
docs: Connect the begin point of this segment to the
  begin point of the given segment.
  This function change the connection points of the two segments.
  
  @param segment the segment.
  @throws IllegalArgumentException if the given segment is not in the same graph.