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

Examples of org.apache.directory.mavibot.btree.comparator.IntComparator


    /**
     * Create a new instance of IntSerializer
     */
    public IntSerializer()
    {
        super( new IntComparator() );
    }
View Full Code Here


    /**
     * Create a new instance of IntSerializer
     */
    public IntSerializer()
    {
        super( new IntComparator() );
    }
View Full Code Here

    /**
     * Create a new instance of IntSerializer
     */
    public IntSerializer()
    {
        super( new IntComparator() );
    }
View Full Code Here

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

TOP

Related Classes of org.apache.directory.mavibot.btree.comparator.IntComparator

Copyright © 2018 www.massapicom. 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.