summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/ai/fdsolver/Var.java
blob: a2b5cd7c5bb51f0273273d84d8beabc397121c00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package jrummikub.ai.fdsolver;

import java.util.Collection;
import java.util.HashSet;
import java.util.Set;

public class Var<T> {
	Set<T> range;
	
	public Var(Solver solver, Collection<T> range) {
		this.range = new HashSet<T>(range);
	}

	public static <T> Var<T> range(Solver solver, T low, T high) {
		// TODO todo todo todo
		return null;
	}

	public T getValue() {
		if (range.size() != 1)
			return null;
		return range.iterator().next();
	}

}