git://git.nikiroo.be
/
fanfix.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix remplace/buffered input stream
[fanfix.git]
/
ui
/
DataNode.java
diff --git
a/ui/DataNode.java
b/ui/DataNode.java
index 2d3ac267842325333484b68886998471981d8135..b4dbe7bb04130bf69e4e67ca12ea330b812544ef 100644
(file)
--- a/
ui/DataNode.java
+++ b/
ui/DataNode.java
@@
-78,8
+78,14
@@
public class DataNode<T> {
return userData;
}
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();
}
for (DataNode<T> child : children) {
s += child.count();
}