Aadded Tree.getLength() method.