Java.
criterion that we want to evaluate. It consists of a predicate that determines whether a given object meets the rule’s criteria use Enum or Map<key,value> (in this part I use enum). RuleEngine: The rule engine is responsible for managing a collection of rules and applying them to a set of objects.