Search in sources :

Example 1 with Modifier

use of pcgen.base.solver.Modifier in project pcgen by PCGen.

the class AbstractFormulaTestCase method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    setup = new SplitFormulaSetup();
    LegalScopeUtilities.loadLegalScopeLibrary(setup.getLegalScopeLibrary());
    localSetup = new IndividualSetup(setup, "Global", new MonitorableVariableStore());
    setup.getSolverFactory().addSolverFormat(Number.class, new Modifier() {

        @Override
        public Object process(EvaluationManager manager) {
            return 0;
        }

        @Override
        public void getDependencies(DependencyManager fdm) {
        }

        @Override
        public long getPriority() {
            return 0;
        }

        @Override
        public Class getVariableFormat() {
            return Number.class;
        }

        @Override
        public String getIdentification() {
            return "SET";
        }

        @Override
        public String getInstructions() {
            return "0";
        }
    });
    setup.getSolverFactory().addSolverFormat(String.class, new Modifier() {

        @Override
        public Object process(EvaluationManager manager) {
            return "";
        }

        @Override
        public void getDependencies(DependencyManager fdm) {
        }

        @Override
        public long getPriority() {
            return 0;
        }

        @Override
        public Class getVariableFormat() {
            return String.class;
        }

        @Override
        public String getIdentification() {
            return "SET";
        }

        @Override
        public String getInstructions() {
            return "";
        }
    });
}
Also used : SplitFormulaSetup(pcgen.base.solver.SplitFormulaSetup) IndividualSetup(pcgen.base.solver.IndividualSetup) DependencyManager(pcgen.base.formula.base.DependencyManager) EvaluationManager(pcgen.base.formula.base.EvaluationManager) MonitorableVariableStore(pcgen.cdom.formula.MonitorableVariableStore) Modifier(pcgen.base.solver.Modifier)

Aggregations

DependencyManager (pcgen.base.formula.base.DependencyManager)1 EvaluationManager (pcgen.base.formula.base.EvaluationManager)1 IndividualSetup (pcgen.base.solver.IndividualSetup)1 Modifier (pcgen.base.solver.Modifier)1 SplitFormulaSetup (pcgen.base.solver.SplitFormulaSetup)1 MonitorableVariableStore (pcgen.cdom.formula.MonitorableVariableStore)1