Package org.apache.directory.mavibot.btree.comparator

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


    {
        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[]
            { 1L, 2L } ) );
View Full Code Here

        // 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[]
            { 1L, 2L } ) );

        // The first long[] is > the second
        assertEquals( 1, comparator.compare( new long[]
View Full Code Here

        assertEquals( 0, comparator.compare( new long[]
            { 1L, 2L }, new long[]
            { 1L, 2L } ) );

        // The first long[] is > the second
        assertEquals( 1, comparator.compare( new long[]
            {}, null ) );
        assertEquals( 1, comparator.compare( new long[]
            { 1L }, null ) );
        assertEquals( 1, comparator.compare( new long[]
            { 1L, 2L }, new long[]
View Full Code Here

            { 1L, 2L } ) );

        // The first long[] is > the second
        assertEquals( 1, comparator.compare( new long[]
            {}, null ) );
        assertEquals( 1, comparator.compare( new long[]
            { 1L }, null ) );
        assertEquals( 1, comparator.compare( new long[]
            { 1L, 2L }, new long[]
            { 1L, 1L } ) );
        assertEquals( 1, comparator.compare( new long[]
View Full Code Here

        // The first long[] is > the second
        assertEquals( 1, comparator.compare( new long[]
            {}, null ) );
        assertEquals( 1, comparator.compare( new long[]
            { 1L }, null ) );
        assertEquals( 1, comparator.compare( new long[]
            { 1L, 2L }, new long[]
            { 1L, 1L } ) );
        assertEquals( 1, comparator.compare( new long[]
            { 1L, 2L, 1L }, new long[]
            { 1L, 2L } ) );
View Full Code Here

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

            { 1L, 2L }, new long[]
            { 1L, 1L } ) );
        assertEquals( 1, comparator.compare( new long[]
            { 1L, 2L, 1L }, new long[]
            { 1L, 2L } ) );
        assertEquals( 1, comparator.compare( new long[]
            { 1L, 2L }, new long[]
            { 1L, 1L, 2L } ) );

        // The first long[] is < the second
        assertEquals( -1, comparator.compare( null, new long[]
View Full Code Here

        assertEquals( 1, comparator.compare( new long[]
            { 1L, 2L }, new long[]
            { 1L, 1L, 2L } ) );

        // The first long[] is < the second
        assertEquals( -1, comparator.compare( null, new long[]
            {} ) );
        assertEquals( -1, comparator.compare( null, new long[]
            { 1L, 2L } ) );
        assertEquals( -1, comparator.compare( null, new long[]
            { -1L, 2L } ) );
View Full Code Here

            { 1L, 1L, 2L } ) );

        // The first long[] is < the second
        assertEquals( -1, comparator.compare( null, new long[]
            {} ) );
        assertEquals( -1, comparator.compare( null, new long[]
            { 1L, 2L } ) );
        assertEquals( -1, comparator.compare( null, new long[]
            { -1L, 2L } ) );
        assertEquals( -1, comparator.compare( new long[]
            {}, new long[]
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.