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

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


    {
        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[]
            { 'a', 'b' } ) );
View Full Code Here

        // 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[]
            { 'a', 'b' } ) );

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

        assertEquals( 0, comparator.compare( new char[]
            { 'a', 'b' }, new char[]
            { 'a', 'b' } ) );

        // The first char[] is > the second
        assertEquals( 1, comparator.compare( new char[]
            {}, null ) );
        assertEquals( 1, comparator.compare( new char[]
            { 'a' }, null ) );
        assertEquals( 1, comparator.compare( new char[]
            { 'a', 'b' }, new char[]
View Full Code Here

            { 'a', 'b' } ) );

        // The first char[] is > the second
        assertEquals( 1, comparator.compare( new char[]
            {}, null ) );
        assertEquals( 1, comparator.compare( new char[]
            { 'a' }, null ) );
        assertEquals( 1, comparator.compare( new char[]
            { 'a', 'b' }, new char[]
            { 'a', 'a' } ) );
        assertEquals( 1, comparator.compare( new char[]
View Full Code Here

        // The first char[] is > the second
        assertEquals( 1, comparator.compare( new char[]
            {}, null ) );
        assertEquals( 1, comparator.compare( new char[]
            { 'a' }, null ) );
        assertEquals( 1, comparator.compare( new char[]
            { 'a', 'b' }, new char[]
            { 'a', 'a' } ) );
        assertEquals( 1, comparator.compare( new char[]
            { 'a', 'b', 'a' }, new char[]
            { 'a', 'b' } ) );
View Full Code Here

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

            { 'a', 'b' }, new char[]
            { 'a', 'a' } ) );
        assertEquals( 1, comparator.compare( new char[]
            { 'a', 'b', 'a' }, new char[]
            { 'a', 'b' } ) );
        assertEquals( 1, comparator.compare( new char[]
            { 'a', 'b' }, new char[]
            { 'a', 'a', 'b' } ) );

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

        assertEquals( 1, comparator.compare( new char[]
            { 'a', 'b' }, new char[]
            { 'a', 'a', 'b' } ) );

        // The first char[] is < the second
        assertEquals( -1, comparator.compare( null, new char[]
            {} ) );
        assertEquals( -1, comparator.compare( null, new char[]
            { 'a', 'b' } ) );
        assertEquals( -1, comparator.compare( null, new char[]
            { '\uffff', 'b' } ) );
View Full Code Here

            { 'a', 'a', 'b' } ) );

        // The first char[] is < the second
        assertEquals( -1, comparator.compare( null, new char[]
            {} ) );
        assertEquals( -1, comparator.compare( null, new char[]
            { 'a', 'b' } ) );
        assertEquals( -1, comparator.compare( null, new char[]
            { '\uffff', 'b' } ) );
        assertEquals( -1, comparator.compare( new char[]
            {}, new char[]
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.