Code example for ListIterator

Methods: previous, previousIndex

0
            } 
 
            @SuppressWarnings("unchecked") 
            public E previous() { 
               if (hasPrevious()) 
                  return (E) i.previous();
               else 
                  throw new NoSuchElementException();
            } 
 
            public int nextIndex() { 
               return i.nextIndex() - offset;
            } 
 
            public int previousIndex() { 
               return i.previousIndex() - offset;
            } 
 
            public void remove() { 
               throw new UnsupportedOperationException();
            }