// get max element private static void testGetMax() { Collection<String> collection = Lists.newArrayList("5", "1", "3", "8", "4"); OrderedIterable<String> orderedIterable = FastList.newListWith("5", "1", "3", "8", "4"); Iterable<String> iterable = collection; // get max element String jdk = Collections.max(collection); // using JDK String gs = orderedIterable.max(); // using GS String guava = Ordering.natural().max(iterable); // using guava System.out.println("max = " + jdk + ":" + guava + ":" + gs); // print max = 8:8:8 }