DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32801>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32801


[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |




------- Additional Comments From [EMAIL PROTECTED]  2005-05-19 16:58 -------
Unfortunately, I cannot use ListOrderedMap in my application. ListOrderedMap
maintains the order, in which the keys were added, while SortedArrayMap provides
fast indexed access to the sorting order of the map (exactly what I need). Below
is an example that demonstrates the difference in behaviour:

EXAMPLE CODE:

        ListOrderedMap lom = new ListOrderedMap();
        lom.put("3", "33");
        lom.put("1", "11");
        lom.put("2", "22");
        for (MapIterator iterator = lom.mapIterator(); iterator.hasNext();) {
            iterator.next();
            System.out.println("Key: " + iterator.getKey() + "; Value: " +
iterator.getValue());
        }
        System.out.println("-----------------------");
        SortedArrayMap sam = new SortedArrayMap();
        sam.put("3", "33");
        sam.put("1", "11");
        sam.put("2", "22");
        for (MapIterator iterator = sam.mapIterator(); iterator.hasNext();) {
            iterator.next();
            System.out.println("Key: " + iterator.getKey() + "; Value: " +
iterator.getValue());
        }

EXAMPLE OUTPUT:

Key: 3; Value: 33
Key: 1; Value: 11
Key: 2; Value: 22
-----------------------
Key: 1; Value: 11
Key: 2; Value: 22
Key: 3; Value: 33


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to