
package Logic;

public class MultModPredicate extends APredicate
{
	private int factor1;
	private int factor2;

	/**
	 * @param factor1 
	 * @param factor2 
	 * @SBGen Constructor assigns factor1, factor2
	 */
	public MultModPredicate(int factor1, int factor2)
	{
		// SBgen: Assign variables
		this.factor1 = factor1;
		this.factor2 = factor2;
		// SBgen: End assign
	}

	/**
	 * @param dat 
	 * @return 
	 */
	public ILogical isTrue(Object dat)
	{
		int x = ((Integer) dat).intValue();
		return (LogicFactory.Singleton().makeLogical( ((x % factor1 == 0) || (x % factor2 == 0))));  
	}
}

