Пример #1
0
 /**
  * Returns the set of all possible effects in the rule.
  *
  * @return the set of all possible effects
  */
 public Set<Effect> getEffects() {
   Set<Effect> effects = new HashSet<Effect>();
   for (RuleCase c : cases) {
     effects.addAll(c.getEffects());
   }
   return effects;
 }
Пример #2
0
 /**
  * Returns the set of all parameter identifiers employed in the rule
  *
  * @return the set of parameter identifiers
  */
 public Set<String> getParameterIds() {
   Set<String> params = new HashSet<String>();
   for (RuleCase c : cases) {
     for (Effect e : c.getEffects()) {
       params.addAll(c.output.getParameter(e).getVariables());
     }
   }
   return params;
 }