Interface RuleBase
- All Known Implementing Classes:
RuleBaseImpl
-
Method Summary
Modifier and TypeMethodDescriptionvoidAdd the given rule to the rule basedefault voidaddAll(Collection<FORule> rules) Adds all the given rules to the rule base.default voidAdds all the given rules from the supplied stream to the rule base.getRules()Returns all rules contained in this base.Returns the rules indexed by body predicate.Returns the rules indexed by head predicate.voidRemoves the given rule from the rule baseMethods inherited from interface Iterable
forEach, iterator, spliterator
-
Method Details
-
getRules
Collection<FORule> getRules()Returns all rules contained in this base.- Returns:
- the rules of this base
-
getRulesByHeadPredicate
Returns the rules indexed by head predicate.- Parameters:
p- a predicate- Returns:
- the rules of this base that contains at least an atom with the given predicate in the head
-
getRulesByBodyPredicate
Returns the rules indexed by body predicate.- Parameters:
p- a predicate- Returns:
- the rules of this base that contains at least an atom with the given predicate in the body
-
add
-
addAll
Adds all the given rules to the rule base.- Parameters:
rules- rules to add
-
addAll
-
remove
-