/** * Sets the {@link #values} and {@link #valueSet} attributes * at position <i>i</i> to the next value of the * {@link #iterators iterator} at position <i>i</i>, or * clear them if the <i>i</i><sup>th</sup> iterator * has no next value. * * @return <tt>false</tt> iff there was no value to set */ private bool set(int i) { java.util.Iterator <Object> it = (java.util.Iterator <Object>)(iterators.get(i)); if (it.hasNext()) { values.set(i, it.next()); valueSet.set(i); return(true); } else { values.set(i, null); valueSet.clear(i); return(false); } }
/** * Sets the iterator at the given index. * * @param index index of the Iterator to replace * @param iterator Iterator to place at the given index * @throws IndexOutOfBoundsException if index < 0 or index > size() * @throws IllegalStateException if iteration has started * @throws NullPointerException if the iterator is null */ public virtual void setIterator(int index, java.util.Iterator <Object> iterator) { checkNotStarted(); if (iterator == null) { throw new java.lang.NullPointerException("Iterator must not be null"); } iterators.set(index, iterator); }