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

import java.util.Comparator;

import jrummikub.ai.fdsolver.Var;

public class GreaterThan<T extends Comparable<T>> extends
		ComparatorConstraint<T> {

	public GreaterThan(boolean allowEqual, Var<T> x, Var<T> y) {
		super(new Comparator<T>() {
			@Override
			public int compare(T o1, T o2) {
				return o2.compareTo(o1);
			}
		}, allowEqual, x, y);
	}
}