

package logic;



public class RangePredicate extends APredicate

{

 private int minVal;

 private int maxVal;



 /**

  * @param minVal 

  * @param maxVal 

  * @SBGen Constructor assigns minVal, maxVal

  */

 public RangePredicate(int minVal, int maxVal)

 {

  // SBgen: Assign variables

  this.minVal = minVal;

  this.maxVal = maxVal;

  // SBgen: End assign

 }



 /**

  * @param dat 

  * @return 

  */

 public IBoolean isTrue(Object dat)

 {

  int x = (Integer)dat;

  return (BooleanFactory.Singleton.makeBoolean( (x>=minVal) && (x<=maxVal)));

 }

}



