- java.lang.Object
-
- org.logicng.transformations.FormulaFactoryImporter
-
- All Implemented Interfaces:
FormulaTransformation
public final class FormulaFactoryImporter extends Object implements FormulaTransformation
A formula transformation which imports a given formula into a new formula factory. If the current factory of the formula and the new formula factory are equal, no action is performed.- Since:
- 1.3.1
- Version:
- 2.0.0
-
-
Constructor Summary
Constructors Constructor Description FormulaFactoryImporter(FormulaFactory newFormulaFactory)Constructs a new formula factory importer with a given formula factory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Formulaapply(Formula formula, boolean cache)Returns the transformed formula.
-
-
-
Constructor Detail
-
FormulaFactoryImporter
public FormulaFactoryImporter(FormulaFactory newFormulaFactory)
Constructs a new formula factory importer with a given formula factory. This is the formula factory where the formulas should be imported to.- Parameters:
newFormulaFactory- the formula factory where the formulas should be imported to
-
-
Method Detail
-
apply
public Formula apply(Formula formula, boolean cache)
Description copied from interface:FormulaTransformationReturns the transformed formula.- Specified by:
applyin interfaceFormulaTransformation- Parameters:
formula- the input formulacache- indicated whether the result (and associated predicates) should be cached in the formula's cache.- Returns:
- the transformed formula
-
-