Debian Codegraph @

org.eclipse.jdt.core.tests.model/workspace/Converter15/src/test0147/X.java

raw
1 package test0147;
2
3 import java.lang.Comparable;
4 import java.util.Collection;
5 import java.util.Iterator;
6
7 public class X {
8 public static <T extends Object & Comparable<? super T>> T min(
9 Collection<? extends T> coll) {
10 Iterator<? extends T> i = coll.iterator();
11 T candidate = i.next();
12
13 while (i.hasNext()) {
14 T next = i.next();
15 if (next.compareTo(candidate) < 0)
16 candidate = next;
17 }
18 return candidate;
19 }
20 }