/** * Clone this object. * @return A clone of this object. */ public Object clone() { RetePatternMatcherFunctionality ret = null; try { ret = (RetePatternMatcherFunctionality)super.clone(); ret.rulebase = (IRulebase)rulebase.clone(); ret.rulebase.addRulebaseListener(ret); ret.node = (ReteNode)node.clone(); } catch(CloneNotSupportedException exception) { throw new RuntimeException("Cloning not supported: "+this); } return ret; } }
/** * Clone this object. * @return A clone of this object. */ public Object clone() { RetePatternMatcherFunctionality ret = null; try { ret = (RetePatternMatcherFunctionality)super.clone(); ret.rulebase = (IRulebase)rulebase.clone(); ret.rulebase.addRulebaseListener(ret); ret.node = (ReteNode)node.clone(); } catch(CloneNotSupportedException exception) { throw new RuntimeException("Cloning not supported: "+this); } return ret; } }
/** * Create a new Rete pattern matcher functionality. */ public RetePatternMatcherFunctionality(IRulebase rulebase) { this.rulebase = rulebase; this.node = new ReteNode(); // Build existing rules of the rulebase. for(Iterator it=rulebase.getRules().iterator(); it.hasNext(); ) node.addRule((IRule)it.next()); node.setInited(true); rulebase.addRulebaseListener(this); }
/** * Create a new Rete pattern matcher functionality. */ public RetePatternMatcherFunctionality(IRulebase rulebase) { this.rulebase = rulebase; this.node = new ReteNode(); // Build existing rules of the rulebase. for(Iterator it=rulebase.getRules().iterator(); it.hasNext(); ) node.addRule((IRule)it.next()); node.setInited(true); rulebase.addRulebaseListener(this); }
rulebase.addRulebaseListener(listener);