'this' in generic type?

In the example below, I have a table that contains rows. Each row knows the table from which it came, so it has a getTable() method. This means that I parameterize Table in the definition of Row.

In Table, I want to parameterize what Rows the table will accept, but this leads to the problem that the Row needs to know what Table type it will accept!!!

The line below works:

interface Table<Rextends Row><V, Table>, Vextends Value>{

But it doesn't seem good to me. Is there a concept of 'this' in parameterized types where I can say: "This type will be of the same type I am defining now" ?

Thanks,

John.

PS. The code tags seem to be inserting an extra > in between Row and <V, Table> for some reason?

interface Value<E>{

E getValue();

void setValue(E value);

}

interface Row<Vextends Value, Textends Table>{

int getRowIndex();

V getValue();

T getTable();

}

interface Table<Rextends Row><V, Table>, Vextends Value>{

R getRow(int rowIndex);

V getValue(int rowIndex);

}

[1779 byte] By [johnnyleitrima] at [2007-11-15]