1 package wtf
.metio
.reguloj
;
3 import java
.util
.Collection
;
5 final class FirstWinsRuleEngine
<CONTEXT
extends Context
<?
>> extends AbstractRuleEngine
<CONTEXT
> {
8 public void infer(final Collection
<Rule
<CONTEXT
>> rules
, final CONTEXT context
) {
10 .filter(rule
-> rule
.fires(context
))
12 .ifPresent(rule
-> rule
.run(context
));