public class FRuleEngineIFactory extends Object
FRuleEngineI
. This class is a singleton pattern, the single global
instance could be replaced to provide a custom implementation.
MyFRuleEngineIFactory anotherFactory = new MyFRuleEngineIFactory();
FRuleEngineIFactory.setInstance(anotherFactory);
Constructor and Description |
---|
FRuleEngineIFactory() |
Modifier and Type | Method and Description |
---|---|
FRuleEngineI |
createFRuleEngineI(ForwardRuleInfGraphI parent,
List<Rule> rules,
boolean useRETE)
Creates a
ForwardRuleInfGraphI instance. |
static FRuleEngineIFactory |
getInstance()
Return the single global instance of this factory
|
static void |
setInstance(FRuleEngineIFactory instance)
Replaces the custom global instance.
|
public static FRuleEngineIFactory getInstance()
public static void setInstance(FRuleEngineIFactory instance)
instance
- the new factory instancepublic FRuleEngineI createFRuleEngineI(ForwardRuleInfGraphI parent, List<Rule> rules, boolean useRETE)
ForwardRuleInfGraphI
instance.parent
- the F or FB infGraph that it using the engine, the parent graph
holds the deductions graph and source data.rules
- the rule set to be processeduseRETE
- if true
force this factory to create a RETEEngine
otherwise a
FRuleEngine
is created.Licenced under the Apache License, Version 2.0