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

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


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


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

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

public class ShortComparatorTest
{
    @Test
    public void testShortComparator()
    {
        ShortComparator comparator = new ShortComparator();

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

TOP

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

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.