summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/ai/fdsolver/constraint/GreaterThanConst.java
blob: 6b00ee3915e98e9a96d3e4324447ad8ded35adfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package jrummikub.ai.fdsolver.constraint;

import jrummikub.ai.fdsolver.Var;

public class GreaterThanConst<T extends Comparable<T>> extends
		FilterConstraint<T> {
	public GreaterThanConst(final boolean allowEqual, Var<T> x, final T y) {
		super(new Filter<T>() {
			@Override
			public boolean accept(T value) {
				return y.compareTo(value) < (allowEqual ? 1 : 0);
			}
		}, x);
	}
}