Manik,
I have noticed that this is the current implementation for Node.getChildren():
public Collection<Node> getChildren()
{
Map m = currentNode.getChildren();
Set<Node> children = new HashSet<Node>(m.size());
Iterator i = m.values().iterator();
while (i.hasNext())
{
children.add(new TreeCacheProxyImpl(treeCache, (NodeImpl) i.next()));
}
return children;
}
Actually, what I need now is a map of (keyFqn, node), i.e., return m. But even if we stick
to this api, creating children will be quite expensive won't it be if getChildren is
called many times (happens for my case dealing with Collection classes).
Thanks,
-Ben