diff -r 3abae898011d -r 40cabcdcd2be samples/openfixed/src/org/apidesign/openfixed/Calculator.java --- a/samples/openfixed/src/org/apidesign/openfixed/Calculator.java Sun Mar 20 20:52:33 2011 +0100 +++ b/samples/openfixed/src/org/apidesign/openfixed/Calculator.java Thu Oct 30 21:30:10 2014 +0100 @@ -13,6 +13,17 @@ private Calculator(EventSupport listeners) { this.listeners = listeners; } + + /** An abstraction over various types of event delivery + * to listeners. Comes with four different implementations. + * A trivial one, asynchronous one, one with support for + * pending events and one for a batch events delivery. + */ + interface EventSupport { + public void fireModificationEvent(ModificationEvent ev); + public void add(ModificationListener l); + public void remove(ModificationListener l); + } public static Calculator create() { return new Calculator(new TrivialEventSupport());