PDA

View Full Version : TreeNode Leaf? What's the point?



jpnet
15 Aug 2008, 11:10 AM
What's the point of declaring whether a TreeNode is a leaf or not? Isn't it implicit by whether the TreeNode has children or not?

Thanks,

JP

simeon
15 Aug 2008, 1:40 PM
an empty folder can contain children so it is treated differently then a node that cannot ever contain children. If you want a node that will never contain children then set it leaf:true