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

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


    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 ) );
        assertEquals( 1, comparator.compare( 1L, -1L ) );
View Full Code Here

    {
        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 ) );
        assertEquals( 1, comparator.compare( 1L, -1L ) );
        assertEquals( -1, comparator.compare( null, 1L ) );
View Full Code Here

        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 ) );
        assertEquals( 1, comparator.compare( 1L, -1L ) );
        assertEquals( -1, comparator.compare( null, 1L ) );
        assertEquals( -1, comparator.compare( 1L, 2L ) );
View Full Code Here

        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 ) );
        assertEquals( 1, comparator.compare( 1L, -1L ) );
        assertEquals( -1, comparator.compare( null, 1L ) );
        assertEquals( -1, comparator.compare( 1L, 2L ) );
        assertEquals( -1, comparator.compare( -1L, 1L ) );
View Full Code Here

        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 ) );
        assertEquals( 1, comparator.compare( 1L, -1L ) );
        assertEquals( -1, comparator.compare( null, 1L ) );
        assertEquals( -1, comparator.compare( 1L, 2L ) );
        assertEquals( -1, comparator.compare( -1L, 1L ) );
    }
View Full Code Here

        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 ) );
        assertEquals( 1, comparator.compare( 1L, -1L ) );
        assertEquals( -1, comparator.compare( null, 1L ) );
        assertEquals( -1, comparator.compare( 1L, 2L ) );
        assertEquals( -1, comparator.compare( -1L, 1L ) );
    }
}
View Full Code Here

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

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

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