Hayden James wrote:
> Now if I use synchronizedMap, which forces me to use the Map interface
> like:
> Map map = Collections.synchronizedMap(new LRUMap());
>
> which iterator from which function do I cast in order to get the same
> behavior as above?
> OrderedMapIterator iter = (OrderedMapIterator) map.entrySet().iterator();
> or maybe
> OrderedMapIterator iter = (OrderedMapIterator) map.keySet().iterator();
>
> or perhaps something completely different. The documentation is a little
> vague on how to accomplish this.
Once you wrap the LRUMap in a synchronized map there is no way to obtain
the ordered iterator.
Stephen
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org