Exemple #1
0
        public override bool addAll <_T0>(int location, java.util.Collection <_T0> collection
                                          )
        {
            java.util.ListIterator <E> it    = listIterator(location);
            java.util.Iterator <_T0>   colIt = collection.iterator();
            int next = it.nextIndex();

            while (colIt.hasNext())
            {
                it.add(colIt.next());
            }
            return(next != it.nextIndex());
        }
Exemple #2
0
 /**
  * Returns the index of the element that would be returned by a
  * subsequent call to {@link #next}.
  * <p>
  * As would be expected, if the iterator is at the physical end of
  * the underlying list, 0 is returned, signifying the beginning of
  * the list.
  *
  * @return the index of the element that would be returned if next() were called
  * @throws NoSuchElementException if there are no elements in the list
  */
 public int nextIndex()
 {
     if (list.isEmpty())
     {
         throw new java.util.NoSuchElementException(
                   "There are no elements for this iterator to loop on");
     }
     if (iterator.hasNext() == false)
     {
         return(0);
     }
     else
     {
         return(iterator.nextIndex());
     }
 }
Exemple #3
0
 public bool hasNext()
 {
     return(iterator.nextIndex() < end);
 }
Exemple #4
0
 public int nextIndex()
 {
     return(iterator.nextIndex());
 }
Exemple #5
0
 public virtual int nextIndex()
 {
     return(iterator.nextIndex());
 }
 /**
  * Gets the index of the previous element.
  *
  * @return the index of the previous element in the iterator
  */
 public int previousIndex()
 {
     return(iterator.nextIndex());
 }
Exemple #7
0
 public Object next()
 {
     lastReturnedIndex = iter.nextIndex();
     return(iter.next());
 }
Exemple #8
0
 public Object next()
 {
     checkMod();
     lastReturnedIndex = iter.nextIndex();
     return(iter.next());
 }