Code example for ListIterator

Methods: hasPrevious

0
            final ListIterator<Type> i = original.listIterator(original.size());
 
            return new Iterator<Type>() {
 
                public boolean hasNext() { 
                    return i.hasPrevious();
                } 
 
                public Type next() { 
                    return i.previous();
                } 
 
                public void remove() { 
                    i.remove();
                } 
            }; 
        } 
    } 
 
    public static <Type> Reversed<Type> reversed(final List<Type> original) {
        return new Reversed<Type>(original);