Here you can find the source of reversed(final List
public static <T> Iterable<T> reversed(final List<T> list)
//package com.java2s; import java.util.Iterator; import java.util.List; import java.util.ListIterator; public class Main { public static <T> Iterable<T> reversed(final List<T> list) { return new Iterable<T>() { public Iterator<T> iterator() { return new Iterator<T>() { final ListIterator<T> it = list.listIterator(list.size()); public boolean hasNext() { return it.hasPrevious(); }/*from ww w . j av a2 s.c o m*/ public T next() { return it.previous(); } public void remove() { it.remove(); } }; } }; } }