All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.coode.oppl.search.solvability.SolvableSearchNode Maven / Gradle / Ivy

package org.coode.oppl.search.solvability;

import static org.coode.oppl.utils.ArgCheck.checkNotNull;

import java.util.Collection;
import java.util.HashSet;
import java.util.Set;

import org.coode.oppl.Variable;
import org.coode.oppl.bindingtree.BindingNode;
import org.semanticweb.owlapi.model.OWLAxiom;
import org.semanticweb.owlapi.model.OWLObject;

/** @author Luigi Iannone */
public class SolvableSearchNode extends SolvabilitySearchNode {
    private final Set values = new HashSet();
    private final Variable variable;

    /** @param variable
     *            variable
     * @param axiom
     *            axiom
     * @param bindingNode
     *            bindingNode
     * @param values
     *            values */
    public SolvableSearchNode(Variable variable, OWLAxiom axiom,
            BindingNode bindingNode, Collection values) {
        super(axiom, bindingNode);
        this.variable = checkNotNull(variable, "variable");
        this.values.addAll(checkNotNull(values, "values"));
    }

    @Override
    public void accept(SolvabilitySearchNodeVisitor visitor) {
        visitor.visitSolvableSearchNode(this);
    }

    @Override
    public  O accept(SolvabilitySearchNodeVisitorEx visitor) {
        return visitor.visitSolvableSearchNode(this);
    }

    /** @return the values */
    public Set getValues() {
        return new HashSet(values);
    }

    /** @return the variable */
    public Variable getVariable() {
        return variable;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy