All Downloads are FREE. Search and download functionalities are using the official Maven repository.

src.samples.java.ex.SCRV_Sample Maven / Gradle / Ivy

Go to download

An auxiliary findbugs.sourceforge.net plugin for java bug detectors that fall outside the narrow scope of detectors to be packaged with the product itself.

The newest version!
package ex;

import java.util.Comparator;

public class SCRV_Sample {
    public static final int T1 = 0;
    public static final int T2 = 1;

    int t = 0;
    int u = 0;

    class SampleComparator implements Comparator {
        @Override
        public int compare(SCRV_Sample arg0, SCRV_Sample arg1) {
            if (arg0.t == arg1.t)
                return 0;

            return -1;
        }
    }

    class SampleComparable implements Comparable {
        @Override
        public int compareTo(SCRV_Sample arg0) {
            if (t == arg0.t)
                return 0;

            return 1;
        }
    }

    class UnconditionalNonZeroReturnComparable implements Comparable {
        @Override
        public int compareTo(SCRV_Sample arg0) {
            if (t == arg0.t)
                return 0;
            else if (u < arg0.u)
                return -1;

            return 1;
        }
    }

    class FPComparator implements Comparable {
        int i = 0;

        @Override
        public int compareTo(FPComparator that) {
            return i < that.i ? -1 : (i == that.i) ? 0 : 1;
        }
    }

    class FPThrowsComparator implements Comparator {
        @Override
        public int compare(SCRV_Sample arg0, SCRV_Sample arg1) {
            throw new UnsupportedOperationException();
        }
    }

    class FPDefaultComparator implements Comparator {
        @Override
        public int compare(String s1, String s2) {
            return 0;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy