samples/openfixed/src/org/apidesign/openfixed/Calculator.java
changeset 409 40cabcdcd2be
parent 375 3abae898011d
     1.1 --- a/samples/openfixed/src/org/apidesign/openfixed/Calculator.java	Sun Mar 20 20:52:33 2011 +0100
     1.2 +++ b/samples/openfixed/src/org/apidesign/openfixed/Calculator.java	Thu Oct 30 21:30:10 2014 +0100
     1.3 @@ -13,6 +13,17 @@
     1.4      private Calculator(EventSupport listeners) {
     1.5          this.listeners = listeners;
     1.6      }
     1.7 +
     1.8 +    /** An abstraction over various types of event delivery
     1.9 +     * to listeners. Comes with four different implementations.
    1.10 +     * A trivial one, asynchronous one, one with support for
    1.11 +     * pending events and one for a batch events delivery.
    1.12 +     */
    1.13 +    interface EventSupport {
    1.14 +        public void fireModificationEvent(ModificationEvent ev);
    1.15 +        public void add(ModificationListener l);
    1.16 +        public void remove(ModificationListener l);
    1.17 +    }
    1.18      
    1.19      public static Calculator create() {
    1.20          return new Calculator(new TrivialEventSupport());