incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awi...@apache.org
Subject svn commit: r468078 - /incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/ArrayMap.java
Date Thu, 26 Oct 2006 18:15:02 GMT
Author: awiner
Date: Thu Oct 26 11:15:01 2006
New Revision: 468078

URL: http://svn.apache.org/viewvc?view=rev&rev=468078
Log:
Clarify purpose of ArrayMap (and why it's implemented the way it is)

Modified:
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/ArrayMap.java

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/ArrayMap.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/ArrayMap.java?view=diff&rev=468078&r1=468077&r2=468078
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/ArrayMap.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/ArrayMap.java
Thu Oct 26 11:15:01 2006
@@ -53,9 +53,15 @@
  * @author The Oracle ADF Faces Team
  */
 // -= Simon Lessard =-
-// FIXME: Using a single array for both the key and the value leads to many 
+//        Using a single array for both the key and the value leads to many 
 //        problems, especially with type safety. Using parallel arrays or 
-//        a sigle array containing nodes would be a much cleaner/safer idea.
+//        a single array containing nodes would be a much cleaner/safer idea.
+// =-= AdamWiner =-=
+//        True, but the whole point of this class is maximal efficiency for
+//        small, transient arrays.  The type safety problems are entirely internal,
+//        not exposed to clients.  Parallel arrays or arrays containing nodes
+//        would be less efficient - if you're willing to allocate bonus objects,
+//        and don't care about efficiency, just use HashMap.
 public class ArrayMap<K,V> extends AbstractMap<K,V> implements Cloneable
 {
   /**



Mime
View raw message