Calling getChildCount() on a newly created BranchTreeNode raises a NullPointerException. E.g.:
LeafTreeNode n = new BranchTreeNode();
n.getChildCount(); // raises NPE
This is surprising for two reasons:
1) Calling a getter on a new instance shouldn't raise any exception.
2) Doing the same with LeafTreeNode, the superclass of BranchTreeNode, works fine. I.e. BranchTreeNode is incompatible with its own superclass:
LeafTreeNode n = new LeafTreeNode();
n.getChildCount(); // OK
Is this inconsistency intended?