new to generics, need help
I know Java very well, but I'm new to generics and I guess I'm just not seeing things right. I'm trying to write a Sudoku solver, which will use constraint satisfaction to search for an answer. If you don't know about constraint satisfaction, it's like graph search where each node (called a variable) has a set of values, and the constraints are things that limit these values. The goal is to search for a value for each variable that satisfies every constraint. In this program, we'll only use binary constraints, where two variables cannot have the same value. Hence, every box will be connected with an inequality constraint to every other box in its row, column, and 3x3 region.
I'd like to keep this generic enough to work on all of the Sudoku variants. Here are the declarations of the interfaces that describe the basic CSP (constraint satisfaction problem) objects:
public interface Variable<T> (here, T is the datatype that goes in the cell. Could be Integer,Character, or anything else)
public interface BinaryConstraint<V extends Variable><T>> (this is the one giving me problems)
public interface Operator<V extends Variable> (an operator is something that compares variables with a certain operation, in this project, it will be "not equal to", but some variations also have "less than").
Here are the declarations for the classes that implement those interfaces:
public class SudokuBox<T> implements Variable<T>
public class SudokuConstraint<SudokuBox><T>> implements BinaryConstraint<SudokuBox><T>> (also giving me problems, along with the interface)
I haven't done an Operator class yet. Any help would be appreciated. If you just give me the correct declaration, that's fine, but it would be great if someone could explain things clearly to me.

