Class DefaultRuleFactory
java.lang.Object
fr.lirmm.graphik.integraal.core.factory.DefaultRuleFactory
- All Implemented Interfaces:
RuleFactory
Default singleton implementation of
RuleFactory.- Author:
- Clément Sipieter (INRIA) <clement@6pi.fr>
-
Method Summary
Modifier and TypeMethodDescriptioncreate()Creates an empty rule.Creates a rule from arrays of body and head atoms.Creates a rule from single body and head atoms.create(InMemoryAtomSet body, InMemoryAtomSet head) Creates a rule from in-memory body and head atom sets.Creates a copy of the provided rule.Creates a rule from iterators over body and head atoms.Creates a labeled rule from single body and head atoms.create(String label, InMemoryAtomSet body, InMemoryAtomSet head) Creates a labeled rule from in-memory body and head atom sets.create(String label, CloseableIteratorWithoutException<Atom> body, CloseableIteratorWithoutException<Atom> head) Creates a labeled rule from iterators over body and head atoms.static DefaultRuleFactoryinstance()Returns the shared rule factory instance.
-
Method Details
-
instance
Returns the shared rule factory instance.- Returns:
- the shared instance
-
create
Description copied from interface:RuleFactoryCreates an empty rule.- Specified by:
createin interfaceRuleFactory- Returns:
- a new empty rule
-
create
Description copied from interface:RuleFactoryCreates a rule from arrays of body and head atoms.- Specified by:
createin interfaceRuleFactory- Parameters:
body- the body atomshead- the head atoms- Returns:
- the created rule
-
create
public Rule create(CloseableIteratorWithoutException<Atom> body, CloseableIteratorWithoutException<Atom> head) Description copied from interface:RuleFactoryCreates a rule from iterators over body and head atoms.- Specified by:
createin interfaceRuleFactory- Parameters:
body- the body atom iteratorhead- the head atom iterator- Returns:
- the created rule
-
create
public Rule create(String label, CloseableIteratorWithoutException<Atom> body, CloseableIteratorWithoutException<Atom> head) Description copied from interface:RuleFactoryCreates a labeled rule from iterators over body and head atoms.- Specified by:
createin interfaceRuleFactory- Parameters:
label- the rule labelbody- the body atom iteratorhead- the head atom iterator- Returns:
- the created rule
-
create
Description copied from interface:RuleFactoryCreates a rule from in-memory body and head atom sets.- Specified by:
createin interfaceRuleFactory- Parameters:
body- the rule bodyhead- the rule head- Returns:
- the created rule
-
create
Description copied from interface:RuleFactoryCreates a labeled rule from in-memory body and head atom sets.- Specified by:
createin interfaceRuleFactory- Parameters:
label- the rule labelbody- the rule bodyhead- the rule head- Returns:
- the created rule
-
create
Description copied from interface:RuleFactoryCreates a rule from single body and head atoms.- Specified by:
createin interfaceRuleFactory- Parameters:
body- the body atomhead- the head atom- Returns:
- the created rule
-
create
Description copied from interface:RuleFactoryCreates a labeled rule from single body and head atoms.- Specified by:
createin interfaceRuleFactory- Parameters:
label- the rule labelbody- the body atomhead- the head atom- Returns:
- the created rule
-
create
Description copied from interface:RuleFactoryCreates a copy of the provided rule.- Specified by:
createin interfaceRuleFactory- Parameters:
rule- the rule to copy- Returns:
- the copied rule
-