X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=ui%2FDataNode.java;h=b4dbe7bb04130bf69e4e67ca12ea330b812544ef;hb=712ddafb749aada41daab85c36ac12f657b2307e;hp=2d3ac267842325333484b68886998471981d8135;hpb=53b84787b28f97a87a0ca7c55138c47d678de956;p=fanfix.git diff --git a/ui/DataNode.java b/ui/DataNode.java index 2d3ac26..b4dbe7b 100644 --- a/ui/DataNode.java +++ b/ui/DataNode.java @@ -78,8 +78,14 @@ public class DataNode { return userData; } - protected int count() { - int s = 0; + /** + * The total number of nodes present in this {@link DataNode} (including + * itself and descendants). + * + * @return the number + */ + public int count() { + int s = 1; for (DataNode child : children) { s += child.count(); }