public interface GroundRuleStore
GroundRules
.
Since this container uses set semantics, no two GroundRules that are equal
can be stored in it. If a Rule
wants to add another GroundRule
that does the same thing over the same GroundAtoms, then it should retrieve
the original GroundRule and modify it.
Modifier and Type | Method and Description |
---|---|
void |
addGroundRule(GroundRule rule)
Adds a GroundRule to this store.
|
void |
close()
Release any memory held by the store.
|
boolean |
containsGroundRule(GroundRule rule)
Checks whether a GroundRule is in this store.
|
int |
count(Rule rule) |
Iterable<WeightedGroundRule> |
getCompatibilityRules() |
Iterable<UnweightedGroundRule> |
getConstraintRules() |
Iterable<GroundRule> |
getGroundRules() |
Iterable<GroundRule> |
getGroundRules(Rule rule)
Returns every GroundRule that was instantiated by a given Rule.
|
void |
removeGroundRule(GroundRule rule)
Removes a GroundRule from this store.
|
void |
removeGroundRules(Rule rule)
Removes all GroundRules that was instantiated by a given rule.
|
int |
size() |
void addGroundRule(GroundRule rule)
rule
- the GroundRule to addvoid close()
void removeGroundRule(GroundRule rule)
rule
- the GroundRule to removeIllegalArgumentException
- if rule is not in this storevoid removeGroundRules(Rule rule)
rule
- the originator of the ground rulesboolean containsGroundRule(GroundRule rule)
rule
- the GroundRule to checkIterable<GroundRule> getGroundRules()
Iterable<WeightedGroundRule> getCompatibilityRules()
WeightedGroundRule
in this storeIterable<UnweightedGroundRule> getConstraintRules()
UnweightedGroundRule
in this storeIterable<GroundRule> getGroundRules(Rule rule)
rule
- the Rule of the GroundRules to returnint size()
int count(Rule rule)
Copyright © 2018 University of California, Santa Cruz. All rights reserved.