Name: Javafag 2007-06-07 15:06 ID:8FwQmpEe
Building a Red-Black Tree for a project. Right now I've got a working Binary Search Tree with constructors:
public class BSTree <T extends Comparable>{
private BSTNode<T> root;
public BSTree(){
}
public BSTree(BSTNode<T> n){
root=n;
}
public BSTree(T c){
root=new BSTNode<T>(c);
}
And then I've got the Red-Black Tree's constructors:
public class RBTree <T extends Comparable> extends BSTree{
public RBTree (){
super();
}
public RBTree (T c){
super(c);
}
public RBTree (BSTNode<T> n){
super(n);
}
My question: Will this handle Parameters correctly? Ex, if I make a RBTree<Integer>(), will it run BSTree<Integer>(), or just BSTree() ?
Sorry for Java faggotry, it's the only language my school teaches.
public class BSTree <T extends Comparable>{
private BSTNode<T> root;
public BSTree(){
}
public BSTree(BSTNode<T> n){
root=n;
}
public BSTree(T c){
root=new BSTNode<T>(c);
}
And then I've got the Red-Black Tree's constructors:
public class RBTree <T extends Comparable> extends BSTree{
public RBTree (){
super();
}
public RBTree (T c){
super(c);
}
public RBTree (BSTNode<T> n){
super(n);
}
My question: Will this handle Parameters correctly? Ex, if I make a RBTree<Integer>(), will it run BSTree<Integer>(), or just BSTree() ?
Sorry for Java faggotry, it's the only language my school teaches.