Index: /root/jboss/4.0.5GA/oswegolocalrepos/src/EDU/oswego/cs/dl/util/concurrent/ConcurrentReaderHashMap.java =================================================================== --- /root/jboss/4.0.5GA/oswegolocalrepos/src/EDU/oswego/cs/dl/util/concurrent/ConcurrentReaderHashMap.java (revision 3) +++ /root/jboss/4.0.5GA/oswegolocalrepos/src/EDU/oswego/cs/dl/util/concurrent/ConcurrentReaderHashMap.java (working copy) @@ -28,6 +28,7 @@ package EDU.oswego.cs.dl.util.concurrent; +import java.util.ArrayList; import java.util.Map; import java.util.AbstractMap; import java.util.AbstractSet; @@ -901,6 +902,34 @@ public void clear() { ConcurrentReaderHashMap.this.clear(); } + + public Object[] toArray() { + Collection c = new ArrayList(); + Object o=null; + for (Iterator i = iterator(); i.hasNext(); ) + { + o = i.next(); + if(o!=null) + { + c.add(o); + } + } + return c.toArray(); + } + + public Object[] toArray(Object[] a) { + Collection c = new ArrayList(); + Object o=null; + for (Iterator i = iterator(); i.hasNext(); ) + { + o = i.next(); + if(o!=null) + { + c.add(o); + } + } + return c.toArray(a); + } } /** @@ -933,6 +962,35 @@ public void clear() { ConcurrentReaderHashMap.this.clear(); } + + public Object[] toArray() { + Collection c = new ArrayList(); + Object o=null; + for (Iterator i = iterator(); i.hasNext(); ) + { + o = i.next(); + if(o!=null) + { + c.add(o); + } + } + return c.toArray(); + } + + public Object[] toArray(Object[] a) { + Collection c = new ArrayList(); + Object o=null; + for (Iterator i = iterator(); i.hasNext(); ) + { + o = i.next(); + if(o!=null) + { + c.add(o); + } + } + return c.toArray(a); + } + } /** @@ -975,6 +1033,34 @@ public void clear() { ConcurrentReaderHashMap.this.clear(); } + + public Object[] toArray() { + Collection c = new ArrayList(); + Object o=null; + for (Iterator i = iterator(); i.hasNext(); ) + { + o = i.next(); + if(o!=null) + { + c.add(o); + } + } + return c.toArray(); + } + + public Object[] toArray(Object[] a) { + Collection c = new ArrayList(); + Object o=null; + for (Iterator i = iterator(); i.hasNext(); ) + { + o = i.next(); + if(o!=null) + { + c.add(o); + } + } + return c.toArray(a); + } } /**