incubator-wink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From el...@apache.org
Subject svn commit: r789685 - /incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/CaseInsensitiveMultivaluedMap.java
Date Tue, 30 Jun 2009 11:35:27 GMT
Author: elman
Date: Tue Jun 30 11:35:27 2009
New Revision: 789685

URL: http://svn.apache.org/viewvc?rev=789685&view=rev
Log:
add toString() method

Modified:
    incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/CaseInsensitiveMultivaluedMap.java

Modified: incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/CaseInsensitiveMultivaluedMap.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/CaseInsensitiveMultivaluedMap.java?rev=789685&r1=789684&r2=789685&view=diff
==============================================================================
--- incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/CaseInsensitiveMultivaluedMap.java
(original)
+++ incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/CaseInsensitiveMultivaluedMap.java
Tue Jun 30 11:35:27 2009
@@ -30,22 +30,22 @@
 
 public class CaseInsensitiveMultivaluedMap<V> implements MultivaluedMap<String,
V> {
 
-    private MultivaluedMap<String, V> map = new MultivaluedMapImpl<String, V>(
-                                              new Comparator<String>() {
+    private final MultivaluedMap<String, V> map = new MultivaluedMapImpl<String,
V>(
+                                                    new Comparator<String>() {
 
-                                                  public int compare(String o1, String o2)
{
-                                                      if (o1 == o2) {
-                                                          return 0;
-                                                      }
-                                                      if (o1 == null) {
-                                                          return -1;
-                                                      }
-                                                      if (o2 == null) {
-                                                          return 1;
-                                                      }
-                                                      return o1.compareToIgnoreCase(o2);
-                                                  }
-                                              });
+                                                        public int compare(String o1, String
o2) {
+                                                            if (o1 == o2) {
+                                                                return 0;
+                                                            }
+                                                            if (o1 == null) {
+                                                                return -1;
+                                                            }
+                                                            if (o2 == null) {
+                                                                return 1;
+                                                            }
+                                                            return o1.compareToIgnoreCase(o2);
+                                                        }
+                                                    });
 
     public void add(String key, V value) {
         map.add(key, value);
@@ -115,4 +115,9 @@
         return map.values();
     }
 
+    @Override
+    public String toString() {
+        return "CaseInsensitiveMultivaluedMap [map=" + map + "]";
+    }
+
 }
\ No newline at end of file



Mime
View raw message