X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=ui%2FDataNode.java;h=b4dbe7bb04130bf69e4e67ca12ea330b812544ef;hb=039277a71df53372192214f46fe5ad4a47937dfa;hp=2d3ac267842325333484b68886998471981d8135;hpb=c389246b6d9baa4a3cc48625582efd80239d73d0;p=nikiroo-utils.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(); }