private void disposeRulesAndResultHandlers ( ) { for ( final Map . Entry < R , List < RH > > entry : rulesToResultHandlers . entrySet ( ) ) { // Dispose rule final R rule = entry . getKey ( ) ; if ( rule instanceof Disposable ) { ( ( Disposable ) rule ) . dispose ( ) ; } // Dispose result handlers final List < RH > resultHandlers = entry . getValue ( ) ; if ( resultHandlers != null ) { for ( final RH resultHandler : resultHandlers ) { if ( resultHandler instanceof Disposable ) { ( ( Disposable ) resultHandler ) . dispose ( ) ; } } } } // Clears all triggers rulesToResultHandlers . clear ( ) ; }
Disposes all rules and result handlers that are mapped to each other .