public void addConnection ( Connection conn ) { if ( conn == null || conn . getSource ( ) == conn . getTarget ( ) ) { throw new IllegalArgumentException ( ) ; } if ( conn . getSource ( ) == this ) { sourceConnections . add ( conn ) ; firePropertyChange ( SOURCE_CONNECTIONS_PROP , null , conn ) ; } else if ( conn . getTarget ( ) == this ) { targetConnections . add ( conn ) ; firePropertyChange ( TARGET_CONNECTIONS_PROP , null , conn ) ; } }
Add an incoming or outgoing connection to this vertex .