public void removeMatchingCoupling(Coupling<?> toRemove){
  for (  Coupling<?> coupling : getCouplings()) {
    boolean consumersMatch=attributesMatch(coupling.getConsumer(),toRemove.getConsumer());
    boolean producersMatch=attributesMatch(coupling.getProducer(),toRemove.getProducer());
    if (consumersMatch && producersMatch) {
      removeCoupling(coupling);
    }
  }
}

public void removeMatchingCoupling ( Coupling < ? > toRemove ) { for ( Coupling < ? > coupling : getCouplings ( ) ) { boolean consumersMatch = attributesMatch ( coupling . getConsumer ( ) , toRemove . getConsumer ( ) ) ; boolean producersMatch = attributesMatch ( coupling . getProducer ( ) , toRemove . getProducer ( ) ) ; if ( consumersMatch && producersMatch ) { removeCoupling ( coupling ) ; } } }
remove coupling ( if any ) that is essentially a copy of the supplied coupling .
