RE: ListOrderedMap vs. LinkedHashMap
[EMAIL PROTECTED] wrote on Wednesday, June 21, 2006 7:37 PM: Hello All - Apologies if this has already been covered. I couldn't find an easy way to search through this mailing list's archives. What is the difference between org.apache.commons.collections.map.ListOrderedMap (from commons-collections-3.2) and java.util.LinkedHashMap (Java 1.5)? It seems to me that they both implement a map while retaining order. Am I missing something? Yep. The implementation from c-c works also for JDKs pre 1.4 ... - Jörg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ListOrderedMap vs. LinkedHashMap
Thanks for the reply. So from a functionality standpoint, they're the same? if i'm developing in 1.5 JDK, then there's no difference for me, right? -Marc Jörg Schaible [EMAIL PROTECTED] lsag-Solutions.co To mJakarta Commons Users List commons-user@jakarta.apache.org 06/21/2006 01:03 cc PM Subject RE: ListOrderedMap vs. Please respond to LinkedHashMap Jakarta Commons Users List [EMAIL PROTECTED] arta.apache.org [EMAIL PROTECTED] wrote on Wednesday, June 21, 2006 7:37 PM: Hello All - Apologies if this has already been covered. I couldn't find an easy way to search through this mailing list's archives. What is the difference between org.apache.commons.collections.map.ListOrderedMap (from commons-collections-3.2) and java.util.LinkedHashMap (Java 1.5)? It seems to me that they both implement a map while retaining order. Am I missing something? Yep. The implementation from c-c works also for JDKs pre 1.4 ... - Jörg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ListOrderedMap vs. LinkedHashMap
LOM has API extensions that LinkedHashMap can't duplicate. Example: in commons-collections 3.2, put(int, Object, Object) was added to LOM, which allows you to insert a mapping at a particular position. There are others. -Matt --- [EMAIL PROTECTED] wrote: Thanks for the reply. So from a functionality standpoint, they're the same? if i'm developing in 1.5 JDK, then there's no difference for me, right? -Marc Jörg Schaible [EMAIL PROTECTED] lsag-Solutions.co To mJakarta Commons Users List commons-user@jakarta.apache.org 06/21/2006 01:03 cc PM Subject RE: ListOrderedMap vs. Please respond to LinkedHashMap Jakarta Commons Users List [EMAIL PROTECTED] arta.apache.org [EMAIL PROTECTED] wrote on Wednesday, June 21, 2006 7:37 PM: Hello All - Apologies if this has already been covered. I couldn't find an easy way to search through this mailing list's archives. What is the difference between org.apache.commons.collections.map.ListOrderedMap (from commons-collections-3.2) and java.util.LinkedHashMap (Java 1.5)? It seems to me that they both implement a map while retaining order. Am I missing something? Yep. The implementation from c-c works also for JDKs pre 1.4 ... - Jörg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ListOrderedMap vs. LinkedHashMap
ListOrderedMap is a decorator. It can wrap _any_ type of map and make it ordered. Stephen [EMAIL PROTECTED] wrote: Hello All - Apologies if this has already been covered. I couldn't find an easy way to search through this mailing list's archives. What is the difference between org.apache.commons.collections.map.ListOrderedMap (from commons-collections-3.2) and java.util.LinkedHashMap (Java 1.5)? It seems to me that they both implement a map while retaining order. Am I missing something? Thanks! -Marc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]