Examples of compare()


Examples of org.apache.directory.mavibot.btree.comparator.BooleanArrayComparator.compare()

    @Test
    public void testBooleanArrayComparator()
    {
        BooleanArrayComparator comparator = new BooleanArrayComparator();

        assertEquals( 0, comparator.compare( null, null ) );

        boolean[] b1 = new boolean[]
            { true, true, true };
        boolean[] b2 = new boolean[]
            { true, true, false };
View Full Code Here

Examples of org.apache.directory.mavibot.btree.comparator.BooleanComparator.compare()

    @Test
    public void testBooleanComparator()
    {
        BooleanComparator comparator = new BooleanComparator();

        assertEquals( 0, comparator.compare( null, null ) );
        assertEquals( 0, comparator.compare( true, true ) );
        assertEquals( 0, comparator.compare( false, false ) );
        assertEquals( 1, comparator.compare( false, null ) );
        assertEquals( 1, comparator.compare( true, null ) );
        assertEquals( 1, comparator.compare( true, false ) );
View Full Code Here

Examples of org.apache.directory.mavibot.btree.comparator.ByteArrayComparator.compare()

    public void testByteArrayComparator()
    {
        ByteArrayComparator comparator = new ByteArrayComparator();

        // Check equality
        assertEquals( 0, comparator.compare( null, null ) );
        assertEquals( 0, comparator.compare( new byte[]
            {}, new byte[]
            {} ) );
        assertEquals( 0, comparator.compare( new byte[]
            { 0x01, 0x02 }, new byte[]
View Full Code Here

Examples of org.apache.directory.mavibot.btree.comparator.ByteComparator.compare()

    @Test
    public void testByteComparator()
    {
        ByteComparator comparator = new ByteComparator();

        assertEquals( 0, comparator.compare( null, null ) );
        assertEquals( 0, comparator.compare( ( byte ) 0x00, ( byte ) 0x00 ) );
        assertEquals( 0, comparator.compare( ( byte ) 0xFE, ( byte ) 0xFE ) );
        assertEquals( 1, comparator.compare( ( byte ) 0x01, null ) );
        assertEquals( 1, comparator.compare( ( byte ) 0x01, ( byte ) 0x00 ) );
        assertEquals( 1, comparator.compare( ( byte ) 0x00, ( byte ) 0xFF ) );
View Full Code Here

Examples of org.apache.directory.mavibot.btree.comparator.CharArrayComparator.compare()

    public void testCharArrayComparator()
    {
        CharArrayComparator comparator = new CharArrayComparator();

        // Check equality
        assertEquals( 0, comparator.compare( null, null ) );
        assertEquals( 0, comparator.compare( new char[]
            {}, new char[]
            {} ) );
        assertEquals( 0, comparator.compare( new char[]
            { 'a', 'b' }, new char[]
View Full Code Here

Examples of org.apache.directory.mavibot.btree.comparator.CharComparator.compare()

    @Test
    public void testCharComparator()
    {
        CharComparator comparator = new CharComparator();

        assertEquals( 0, comparator.compare( null, null ) );
        assertEquals( 0, comparator.compare( 'a', 'a' ) );
        assertEquals( 0, comparator.compare( '\u00e9', '\u00e9' ) );
        assertEquals( 1, comparator.compare( 'a', null ) );
        assertEquals( -1, comparator.compare( 'A', 'a' ) );
        assertEquals( 1, comparator.compare( 'a', 'A' ) );
View Full Code Here

Examples of org.apache.directory.mavibot.btree.comparator.IntArrayComparator.compare()

    public void testIntArrayComparator()
    {
        IntArrayComparator comparator = new IntArrayComparator();

        // Check equality
        assertEquals( 0, comparator.compare( null, null ) );
        assertEquals( 0, comparator.compare( new int[]
            {}, new int[]
            {} ) );
        assertEquals( 0, comparator.compare( new int[]
            { 1, 2 }, new int[]
View Full Code Here

Examples of org.apache.directory.mavibot.btree.comparator.IntComparator.compare()

    @Test
    public void testIntComparator()
    {
        IntComparator comparator = new IntComparator();

        assertEquals( 0, comparator.compare( null, null ) );
        assertEquals( 0, comparator.compare( 1, 1 ) );
        assertEquals( 0, comparator.compare( -1, -1 ) );
        assertEquals( 1, comparator.compare( 1, null ) );
        assertEquals( 1, comparator.compare( 2, 1 ) );
        assertEquals( 1, comparator.compare( 3, 1 ) );
View Full Code Here

Examples of org.apache.directory.mavibot.btree.comparator.LongArrayComparator.compare()

    public void testLongArrayComparator()
    {
        LongArrayComparator comparator = new LongArrayComparator();

        // Check equality
        assertEquals( 0, comparator.compare( null, null ) );
        assertEquals( 0, comparator.compare( new long[]
            {}, new long[]
            {} ) );
        assertEquals( 0, comparator.compare( new long[]
            { 1L, 2L }, new long[]
View Full Code Here

Examples of org.apache.directory.mavibot.btree.comparator.LongComparator.compare()

    @Test
    public void testLongComparator()
    {
        LongComparator comparator = new LongComparator();

        assertEquals( 0, comparator.compare( null, null ) );
        assertEquals( 0, comparator.compare( 1L, 1L ) );
        assertEquals( 0, comparator.compare( -1L, -1L ) );
        assertEquals( 1, comparator.compare( 1L, null ) );
        assertEquals( 1, comparator.compare( 2L, 1L ) );
        assertEquals( 1, comparator.compare( 3L, 1L ) );
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.