@Test public void noListenersDontCauseProblems() { ComparisonListenerSupport s = new ComparisonListenerSupport(); s.fireComparisonPerformed(null, ComparisonResult.EQUAL); }
public void fireComparisonPerformed(Comparison comparison, ComparisonResult outcome) { fire(comparison, outcome, compListeners); if (outcome == ComparisonResult.EQUAL) { fire(comparison, outcome, matchListeners); } else { fire(comparison, outcome, diffListeners); } }
ComparisonListenerSupport { public void fireComparisonPerformed(Comparison comparison, ComparisonResult outcome) { fire(comparison, outcome, compListeners); if (outcome == ComparisonResult.EQUAL) { fire(comparison, outcome, matchListeners); } else { fire(comparison, outcome, diffListeners); } } }
ComparisonListenerSupport { public void fireComparisonPerformed(Comparison comparison, ComparisonResult outcome) { fire(comparison, outcome, compListeners); if (outcome == ComparisonResult.EQUAL) { fire(comparison, outcome, matchListeners); } else { fire(comparison, outcome, diffListeners); } }  }
ComparisonListenerSupport { public void fireComparisonPerformed(Comparison comparison, ComparisonResult outcome) { fire(comparison, outcome, compListeners); if (outcome == ComparisonResult.EQUAL) { fire(comparison, outcome, matchListeners); } else { fire(comparison, outcome, diffListeners); } }  void addComparisonListener(ComparisonListener l); void addMatchListener(ComparisonListener l); void addDifferenceListener(ComparisonListener l); void fireComparisonPerformed(Comparison comparison,
                                        ComparisonResult outcome); }
ComparisonListenerSupport { public void fireComparisonPerformed(Comparison comparison, ComparisonResult outcome) { fire(comparison, outcome, compListeners); if (outcome == ComparisonResult.EQUAL) { fire(comparison, outcome, matchListeners); } else { fire(comparison, outcome, diffListeners); } }  void addComparisonListener(ComparisonListener l); void addMatchListener(ComparisonListener l); void addDifferenceListener(ComparisonListener l); void fireComparisonPerformed(Comparison comparison,
                                        ComparisonResult outcome);  }