Class RuleBaseImpl
java.lang.Object
fr.inria.rules.integraal.model.kb.impl.RuleBaseImpl
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor, uses a HashSet to store rulesRuleBaseImpl(Collection<FORule> rules) Default constructor Also initializes the indexes -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd the given rule to the rule basebooleangetRules()//////////////////////////////////////////////Returns the rules indexed by body predicate.Returns the rules indexed by head predicate.inthashCode()//////////////////////////////////////////////iterator()voidRemoves the given rule from the rule basetoString()Methods inherited from interface Iterable
forEach, spliterator
-
Constructor Details
-
RuleBaseImpl
public RuleBaseImpl()Default constructor, uses a HashSet to store rules -
RuleBaseImpl
Default constructor Also initializes the indexes- Parameters:
rules- the rules
-
-
Method Details
-
getRules
////////////////////////////////////////////// -
getRulesByHeadPredicate
Description copied from interface:RuleBaseReturns the rules indexed by head predicate.- Specified by:
getRulesByHeadPredicatein interfaceRuleBase- Parameters:
p- a predicate- Returns:
- the rules of this base that contains at least an atom with the given predicate in the head
-
getRulesByBodyPredicate
Description copied from interface:RuleBaseReturns the rules indexed by body predicate.- Specified by:
getRulesByBodyPredicatein interfaceRuleBase- Parameters:
p- a predicate- Returns:
- the rules of this base that contains at least an atom with the given predicate in the body
-
add
-
remove
-
hashCode
-
equals
-
toString
-
iterator
-