I am not able to create Class with Generics. I want generic type parameter for the class, which itself accept generics as shown. Is there any way to achieve this?
public class Node<D, C<D,C>> {
D data;
C<D,C> children;
public D getData() {
return data;
}
public void setData(D data) {
this.data = data;
}
public C<D,C> getChildren() {
return children;
}
public void setChildren(C<D,C> children) {
this.children = children;
}
}