Re: [Collections][Submit] TreeNode and friends

2002-05-27 Thread Kief Morris
Stephen Colebourne typed the following on 07:48 PM 5/26/2002 +0100 4. Must tree iterators be depth-first? The ordered traversal for a heap tree isn't depth-first. No, but depth first is the one I needed ;-) There are two possibilities here, a) Add extra methods for different

Re: [Collections] TreeNode, TreeIterator, IdentityHashSet proposed collections

2002-04-06 Thread Kief Morris
Sorry for the delay in responding, too much going on outside the coding life. Stephen Colebourne typed the following on 12:49 AM 4/2/2002 +0100 I would suggest it would be better to keep the list holding the children better hidden from the user. Children can be added and removed with methods

Re: [Collections] TreeNode, TreeIterator, IdentityHashSet proposed collections

2002-04-01 Thread Kief Morris
I realised that the difference between the two implementations is that you view the tree as a single 'flat' collection (which happens to be a Map). Tree allows the values to be added and removed without ever really knowing much about the structure of the tree. In fact, you go further in

Re: [Collections] TreeNode, TreeIterator, IdentityHashSet proposed collections

2002-04-01 Thread Kief Morris
I realised that the difference between the two implementations is that you view the tree as a single 'flat' collection (which happens to be a Map). Tree allows the values to be added and removed without ever really knowing much about the structure of the tree. In fact, you go further in

Re: [Collections] TreeNode, TreeIterator, IdentityHashSet proposed collections

2002-04-01 Thread Kief Morris
Which suggests the right approach to take is to leave TreeNode as it is, and consider whether to make an implementation of Tree that uses TreeNode for its guts. This was kind of where I was heading. What if the keys in your implementation became TreeNodes? I'm not sure I see the

Re: [Collections] TreeNode, TreeIterator, IdentityHashSet proposed collections

2002-04-01 Thread Kief Morris
Stephen, I have some questions/suggestions on your TreeNode implementation. It looks like ArrayTreeNode expects users to access and manipulate the children of a node by returning a List from getChildren(), which users then use to add, delete, and access the child nodes. I don't think this

Re: [Collections] TreeNode, TreeIterator, IdentityHashSet proposed collections

2002-03-30 Thread Kief Morris
Stephen Colebourne typed the following on 02:59 PM 3/29/2002 + We ought to make a common interface for both versions, which would look more like your TreeNode than my Tree, although I suggest we name it Tree. ... Makes sense in theory, but the main problem that I foresee is that it is not

Re: [Collections] TreeNode, TreeIterator, IdentityHashSet proposed collections

2002-03-29 Thread Kief Morris
://www.scolebourne.eurobell.co.uk/JodaTreeProposal.zip ... I note that a Tree proposal from Kief Morris based on Map was submitted recently - http://marc.theaimsgroup.com/?l=jakarta-commons-devm=101561962307536w=2. I would also be interested in any feedback as to how these two proposals might relate. (The designs

[COLLECTIONS] Submission: Tree StandardTree

2002-03-08 Thread Kief Morris
Morgan Delagrange typed the following on 01:35 PM 3/7/2002 -0600 Please, accompany any new collections with appropriate unit tests. Try to integrate those unit tests with our micro-framework for testing, but if you have trouble I'll do it for you. Any new Collection that does not include tests