@@ -0,0 +1,781 @@
+import java.util.Comparator;%0A%0Apublic class SC_Sample %7B%0A    public static final int T1 = 0;%0A    public static final int T2 = 1;%0A%0A    int t = 0;%0A%0A    class SampleComparator implements Comparator%3CSC_Sample%3E %7B%0A        public int compare(SC_Sample arg0, SC_Sample arg1) %7B%0A            if (arg0.t == arg1.t)%0A                return 0;%0A%0A            return -1;%0A        %7D%0A    %7D%0A%0A    class SampleComparable implements Comparable%3CSC_Sample%3E %7B%0A        public int compareTo(SC_Sample arg0) %7B%0A            if (t == arg0.t)%0A                return 0;%0A%0A            return 1;%0A        %7D%0A    %7D%0A%0A    class FPComparator implements Comparable%3CFPComparator%3E %7B%0A        int i = 0;%0A%0A        public int compareTo(FPComparator that) %7B%0A            return i %3C that.i ? -1 : (i == that.i) ? 0 : 1;%0A        %7D%0A    %7D%0A%7D%0A

add example file