Exemple #1
0
 /**
  * Returns the index of the element that would be returned by a
  * subsequent call to {@link #previous}.
  * <p>
  * As would be expected, if at the iterator is at the physical
  * beginning of the underlying list, the list's size minus one is
  * returned, signifying the end of the list.
  *
  * @return the index of the element that would be returned if previous() were called
  * @throws NoSuchElementException if there are no elements in the list
  */
 public int previousIndex()
 {
     if (list.isEmpty())
     {
         throw new java.util.NoSuchElementException(
                   "There are no elements for this iterator to loop on");
     }
     if (iterator.hasPrevious() == false)
     {
         return(list.size() - 1);
     }
     else
     {
         return(iterator.previousIndex());
     }
 }
Exemple #2
0
 public bool hasPrevious()
 {
     return(iterator.previousIndex() >= start);
 }
Exemple #3
0
 public int previousIndex()
 {
     return(iterator.previousIndex());
 }
Exemple #4
0
 public virtual int previousIndex()
 {
     return(iterator.previousIndex());
 }
Exemple #5
0
 public Object previous()
 {
     lastReturnedIndex = iter.previousIndex();
     return(iter.previous());
 }