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

net.sf.gluebooster.java.booster.basic.math.ConditionNOP Maven / Gradle / Ivy

package net.sf.gluebooster.java.booster.basic.math;

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

import net.sf.gluebooster.java.booster.essentials.math.Condition;
import net.sf.gluebooster.java.booster.essentials.meta.HasName;
import net.sf.gluebooster.java.booster.essentials.objects.BoostedObject;

/**
 * An implementation without functionality
 * 
 * @author cbauer
 *
 */
public class ConditionNOP extends BoostedObject implements Condition {

	public ConditionNOP() {
	}

	/**
	 * 
	 * @param name
	 *            the name of this instance.
	 */
	public ConditionNOP(String name) {
		setName(name);
	}

	@Override
	public Collection implies(Condition otherCondition) throws Exception {
		return Collections.EMPTY_LIST;
	}

	@Override
	public Collection isInConflict(Condition otherCondition) throws Exception {
		return Collections.EMPTY_LIST;
	}

	@Override
	public boolean isElementary() throws Exception {

		return true;
	}

	@Override
	public  Set split() throws Exception {
		Set result = new HashSet<>();
		result.add((Result) this);
		return result;
	}

	@Override
	public Condition difference(Condition otherCondition) throws Exception {
		return this;
	}

	@Override
	public void remove(Condition otherCondition) throws Exception {
	}

	@Override
	public void add(Condition... otherCondition) throws Exception {
	}

	@Override
	public Condition createEmptyCondition() throws Exception {
		return this;
	}


	@Override
	public ConditionNOP cloneMe() throws Exception {
		return new ConditionNOP();
	}

	@Override
	public  Result findSubcondition(Result template) throws Exception {
		return null;
	}

	@Override
	public Collection isImpliedBy(Condition otherCondition) throws Exception {
		return null;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy