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

fr.boreal.model.logicalElements.functional.SpecificVariablesInSubstitutionMapToConstant Maven / Gradle / Ivy

The newest version!
package fr.boreal.model.logicalElements.functional;

import java.util.Collection;

import org.apache.commons.collections4.Predicate;

import fr.boreal.model.logicalElements.api.Substitution;
import fr.boreal.model.logicalElements.api.Variable;

/**
 * Predicate used to filter substitutions that do not map only to constants.
 */

public class SpecificVariablesInSubstitutionMapToConstant implements Predicate {

	private final Collection variables;

	public SpecificVariablesInSubstitutionMapToConstant(Collection vars) {
		this.variables = vars;
	}

	@Override
	public boolean evaluate(Substitution s) {
		return s.mapsToConstantsOnly(variables);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy