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

import java.util.Comparator;

import jrummikub.ai.fdsolver.Var;

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

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