Code example for ListIterator

Methods: previous

0
        public boolean hasNext() { 
            return keyIterator.hasPrevious();
        } 
 
        public Map.Entry<A, B> next() throws NoSuchElementException {
            return new Entry<A, B>(keyIterator.previous(), valueIterator.previous());
        } 
 
        public void remove() { 
            throw new UnsupportedOperationException();
        } 
    } 
 
    /** 
     * Class to masquerade as Map.Entry. 
     * 
     * @param <C> 
     * @param <D> 
     */ 
    public class Entry<C, D> implements Map.Entry<A, B> {
        private A key;