/**
  * 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);
 }
Exemple #2
0
        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);
        }
Exemple #3
0
 public void set(E @object)
 {
     iterator.set(@object);
 }
Exemple #4
0
 public virtual void set(Object obj)
 {
     iterator.set(obj);
 }