예제 #1
0
 /** Adds all elements of the NamedIterator to this. */
 public void add(NamedIterator it) {
   it.reset();
   synchronized (this) {
     while (it.hasMore()) {
       data.addElement(it.next());
     }
   }
 }
예제 #2
0
 // ------------------------------------------------------------------------
 // --- methods                                                          ---
 // ------------------------------------------------------------------------
 public Object clone() {
   NamedIterator c = new NamedIterator(true);
   synchronized (this) {
     c.data = (Vector) data.clone();
     c.hash = (Hashtable) hash.clone();
     c.pos = pos;
     c.readonly = readonly;
   }
   return c;
 }