/** * Replaces the last returned element. * * @param obj the object to set * @throws UnsupportedOperationException if the list is unmodifiable * @throws IllegalStateException if the iterator is not in a valid state for set */ public void set(Object obj) { if (validForUpdate == false) { throw new java.lang.IllegalStateException("Cannot set to list until next() or previous() called"); } iterator.set(obj); }
public override E set(int location, E @object) { java.util.ListIterator <E> it = listIterator(location); if (!it.hasNext()) { throw new System.IndexOutOfRangeException(); } E result = it.next(); it.set(@object); return(result); }
public void set(E @object) { iterator.set(@object); }
public virtual void set(Object obj) { iterator.set(obj); }