@ SuppressWarnings ( "unchecked" ) public GivenRuleBuilder < T , U > given ( String name , T value ) { Rule < T , U > rule = _name . map ( ruleName -> ( Rule < T , U > ) new AuditableRule < T , U > ( newRule ( ) , ruleName ) ) . orElse ( newRule ( ) ) ; if ( rule == null ) { throw new IllegalStateException ( "No Rule is instantiated; An invalid Rule class may have been provided" ) ; } return new GivenRuleBuilder < T , U > ( rule , new Fact < T > ( name , value ) ) ; }
Adds a fact to the Rule using a name value pair to specify a new fact .