@ SuppressWarnings ( "unchecked" ) public ThenRuleBuilder < T , U > then ( Consumer < NameValueReferableTypeConvertibleMap < T > > action ) { Rule < T , U > rule = _name . map ( name -> ( Rule < T , U > ) new AuditableRule < T , U > ( newRule ( ) , name ) ) . orElse ( newRule ( ) ) ; if ( rule == null ) { throw new IllegalStateException ( "No Rule is instantiated; An invalid Rule class may have been provided" ) ; } return new ThenRuleBuilder < T , U > ( rule , action ) ; }
Adds an action as a Consumer to the Rule .