Here you can find the source of reversed(List
public static <T> Iterable<T> reversed(List<T> list)
//package com.java2s; //License from project: Open Source License import java.util.Iterator; import java.util.List; import java.util.ListIterator; public class Main { public static <T> Iterable<T> reversed(List<T> list) { return () -> { ListIterator<T> li = list.listIterator(list.size()); return new Iterator<T>() { @Override/* www .j a v a 2 s . c o m*/ public boolean hasNext() { return li.hasPrevious(); } @Override public T next() { return li.previous(); } }; }; } }