drools-eclipse/org.drools.eclipse/src/main/java/org/drools/eclipse/editors/rete/model/Connection.java
public BaseVertex getOpposite(BaseVertex vertex) {
        // If null or not part of this connection
        if ( vertex == null || (!vertex.equals( getSource() ) && !vertex.equals( getTarget() )) ) {
            return null;
        }
        if ( vertex.equals( getSource() ) ) {
            return getTarget();
        }
        return getSource();
    }
public BaseVertex getOpposite(BaseVertex vertex) {
        // If null or not part of this connection
        if ( vertex == null || (!vertex.equals( getSource() ) && !vertex.equals( getTarget() )) ) {
            return null;
        }
        if ( vertex.equals( getSource() ) ) {
            return getTarget();
        }
        return getSource();
    }
public BaseVertex getOpposite ( BaseVertex vertex ) { // If null or not part of this connection if ( vertex == null || ( ! vertex . equals ( getSource ( ) ) && ! vertex . equals ( getTarget ( ) ) ) ) { return null ; } if ( vertex . equals ( getSource ( ) ) ) { return getTarget ( ) ; } return getSource ( ) ; }
Gets opposite of specified vertex.

Returning <code>null</code> if specified not does not belong into this connection.

@param vertex
@return opposite of vertex
Gets opposite of specified vertex .