public override java.util.Iterator <Object> iterator() { IteratorChain chain = new IteratorChain(); for (java.util.Iterator <Object> it = root.keySet().iterator(); it.hasNext();) { chain.addIterator(new ValuesIterator(it.next(), root)); } return(chain); }
/** * Gets an iterator over all the collections in this composite. * <p> * This implementation uses an <code>IteratorChain</code>. * * @return an <code>IteratorChain</code> instance which supports * <code>remove()</code>. Iteration occurs over contained collections in * the order they were added, but this behavior should not be relied upon. * @see IteratorChain */ public virtual java.util.Iterator <Object> iterator() { if (this.all.Length == 0) { return(EmptyIterator.INSTANCE); } IteratorChain chain = new IteratorChain(); for (int i = 0; i < this.all.Length; ++i) { chain.addIterator(this.all[i].iterator()); } return(chain); }