You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by kn...@apache.org on 2009/11/23 21:49:54 UTC

svn commit: r883497 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/util/SymbolHash.java

Author: knoaman
Date: Mon Nov 23 20:49:53 2009
New Revision: 883497

URL: http://svn.apache.org/viewvc?rev=883497&view=rev
Log:
Return key/value pairs of all entries in the map - Keep 1.1 branch up to date with Xerces-J trunk

Modified:
    xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/util/SymbolHash.java

Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/util/SymbolHash.java
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/util/SymbolHash.java?rev=883497&r1=883496&r2=883497&view=diff
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/util/SymbolHash.java (original)
+++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/util/SymbolHash.java Mon Nov 23 20:49:53 2009
@@ -133,7 +133,22 @@
         }
         return fNum;
     }
-    
+
+    /**
+     * Return key/value pairs of all entries in the map
+     */
+    public Object[] getEntries() {
+        Object[] entries = new Object[fNum << 1];
+        for (int i=0, j=0; i<fTableSize && j<fNum << 1; i++) {
+            for (Entry entry = fBuckets[i]; entry != null; entry = entry.next) {
+                entries[j] = entry.key;
+                entries[++j] = entry.value; 
+                j++;
+            }
+        }
+        return entries;
+    }
+
     /**
      * Make a clone of this object.
      */



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org