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

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


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


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

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

public class LongComparatorTest
{
    @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 ) );
        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

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

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.