Here you can find the source of isSortedDescending(List
public static boolean isSortedDescending(List<Integer> list)
//package com.java2s; //License from project: Open Source License import java.util.List; public class Main { public static boolean isSortedDescending(List<Integer> list) { if (list.size() < 2) return true; for (int i = 1; i < list.size(); i++) { if (list.get(i - 1) < list.get(i)) { return false; }/*from www. j a v a 2 s . com*/ } return true; } }