Merge commit '8b2627ce767579eb616e262b3f45f810a88ec200'
[fanfix.git] / src / be / nikiroo / utils / ui / DataNode.java
index 2d3ac267842325333484b68886998471981d8135..b4dbe7bb04130bf69e4e67ca12ea330b812544ef 100644 (file)
@@ -78,8 +78,14 @@ public class DataNode<T> {
                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<T> child : children) {
                        s += child.count();
                }