Package com.googlecode.gaal.data.api

Examples of com.googlecode.gaal.data.api.IntSequence.compareTo()


        // a bigger sequence
        IntSequence bigger = new ArraySequence(new int[] { 2, 3, 5 });
        System.out.printf("%s<%s\n", sequence, bigger);
        assertTrue(sequence.compareTo(bigger) < 0);
        System.out.printf("%s>%s\n", bigger, sequence);
        assertTrue(bigger.compareTo(sequence) > 0);
        // a smaller sequence
        IntSequence smaller = new ArraySequence(new int[] { 1, 2, 3 });
        System.out.printf("%s>%s\n", sequence, smaller);
        assertTrue(sequence.compareTo(smaller) > 0);
        System.out.printf("%s<%s\n", smaller, sequence);
View Full Code Here


        // a smaller sequence
        IntSequence smaller = new ArraySequence(new int[] { 1, 2, 3 });
        System.out.printf("%s>%s\n", sequence, smaller);
        assertTrue(sequence.compareTo(smaller) > 0);
        System.out.printf("%s<%s\n", smaller, sequence);
        assertTrue(smaller.compareTo(sequence) < 0);
        // a shorter sequence
        IntSequence shorter = new ArraySequence(new int[] { 2, 3 });
        System.out.printf("%s>%s\n", sequence, shorter);
        assertTrue(sequence.compareTo(shorter) > 0);
        System.out.printf("%s<%s\n", shorter, sequence);
View Full Code Here

        // a shorter sequence
        IntSequence shorter = new ArraySequence(new int[] { 2, 3 });
        System.out.printf("%s>%s\n", sequence, shorter);
        assertTrue(sequence.compareTo(shorter) > 0);
        System.out.printf("%s<%s\n", shorter, sequence);
        assertTrue(shorter.compareTo(sequence) < 0);
        // a longer sequence
        IntSequence longer = new ArraySequence(new int[] { 2, 3, 4, 5 });
        System.out.printf("%s<%s\n", sequence, longer);
        assertTrue(sequence.compareTo(longer) < 0);
        System.out.printf("%s>%s\n", longer, sequence);
View Full Code Here

        // a longer sequence
        IntSequence longer = new ArraySequence(new int[] { 2, 3, 4, 5 });
        System.out.printf("%s<%s\n", sequence, longer);
        assertTrue(sequence.compareTo(longer) < 0);
        System.out.printf("%s>%s\n", longer, sequence);
        assertTrue(longer.compareTo(sequence) > 0);

    }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.