TreeMap retrieval

Having populated a TreeMap with put(String key, Object value) calls, how do i retrieve the object using an iterator? or dont i?

at the moment:

tree.keySet().iterator() gets me the string keys..
tree.entrySet().iterator() gets me strings of "key=Object@DEADBEEF"

where key is the key, the equals sign is literal, the Object is the type, and DEADBEEF is a memory address..

i just want the object.. put i iterate the keys and perform a get() on every single one of them?
[507 byte] By [cjard] at [2007-11-18 19:13:51]
# 1 Re: TreeMap retrieval
http://java.sun.com/j2se/1.4.2/docs/api/java/util/TreeMap.html#values()

Basically:

...
Collection treeValues = tree.values();

for (Iterator treeIter = treeValues.iterator(); treeIter.hasNext();
{...
}
cma at 2007-11-10 2:29:46 >
# 2 Re: TreeMap retrieval
i knew it was in there somewhere.. not to worry, as i later found out that i needed random access to the values in the map, so my initial desire to run 2 iterators in step and print the keys and the values, wasnt right anyway :)

thanks cma..
cjard at 2007-11-10 2:30:46 >