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

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


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


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

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

public class StringComparatorTest
{
    @Test
    public void testStringComparator()
    {
        StringComparator comparator = new StringComparator();

        assertEquals( 0, comparator.compare( null, null ) );
        assertEquals( 0, comparator.compare( "", "" ) );
        assertEquals( 0, comparator.compare( "abc", "abc" ) );
        assertEquals( 1, comparator.compare( "", null ) );
        assertEquals( 1, comparator.compare( "abc", "" ) );
        assertEquals( 1, comparator.compare( "ac", "ab" ) );
        assertEquals( 1, comparator.compare( "abc", "ab" ) );
        assertEquals( -1, comparator.compare( null, "" ) );
        assertEquals( -1, comparator.compare( "ab", "abc" ) );
        assertEquals( -1, comparator.compare( "ab", "abc" ) );
    }
View Full Code Here

TOP

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

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.