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

aima.core.agent.impl.aprog.simplerule.Condition Maven / Gradle / Ivy

Go to download

AIMA-Java Core Algorithms from the book Artificial Intelligence a Modern Approach 3rd Ed.

The newest version!
package aima.core.agent.impl.aprog.simplerule;

import aima.core.agent.impl.ObjectWithDynamicAttributes;

/**
 * Base abstract class for describing conditions.
 * 
 * @author Ciaran O'Reilly
 * 
 */
public abstract class Condition {
	public abstract boolean evaluate(ObjectWithDynamicAttributes p);

	@Override
	public boolean equals(Object o) {
		if (o == null || !(o instanceof Condition)) {
			return super.equals(o);
		}
		return (toString().equals(((Condition) o).toString()));
	}

	@Override
	public int hashCode() {
		return toString().hashCode();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy