Examples of ByteComparator


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

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

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

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

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

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

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

public class ByteComparatorTest
{
    @Test
    public void testByteComparator()
    {
        ByteComparator comparator = new ByteComparator();

        assertEquals( 0, comparator.compare( null, null ) );
        assertEquals( 0, comparator.compare( ( byte ) 0x00, ( byte ) 0x00 ) );
        assertEquals( 0, comparator.compare( ( byte ) 0xFE, ( byte ) 0xFE ) );
        assertEquals( 1, comparator.compare( ( byte ) 0x01, null ) );
        assertEquals( 1, comparator.compare( ( byte ) 0x01, ( byte ) 0x00 ) );
        assertEquals( 1, comparator.compare( ( byte ) 0x00, ( byte ) 0xFF ) );
        assertEquals( 1, comparator.compare( ( byte ) 0x7F, ( byte ) 0x01 ) );
        assertEquals( -1, comparator.compare( null, ( byte ) 0x00 ) );
        assertEquals( -1, comparator.compare( null, ( byte ) 0xFF ) );
        assertEquals( -1, comparator.compare( ( byte ) 0x00, ( byte ) 0x01 ) );
        assertEquals( -1, comparator.compare( ( byte ) 0xF0, ( byte ) 0xFF ) );
        assertEquals( -1, comparator.compare( ( byte ) 0xFF, ( byte ) 0x01 ) );
    }
View Full Code Here

Examples of org.apache.flink.api.common.typeutils.base.ByteComparator

public class ByteComparatorTest extends ComparatorTestBase<Byte> {

  @Override
  protected TypeComparator<Byte> createComparator(boolean ascending) {
    return new ByteComparator(ascending);
  }
View Full Code Here

Examples of org.apache.mahout.math.function.ByteComparator

  }
 
  @Test
  public void testQuickSortBytes() {
   
    ByteComparator revComp = new ByteComparator() {
     
      @Override
      public int compare(byte o1, byte o2) {
        if (o2 < o1) {
          return -1;
View Full Code Here

Examples of org.apache.mahout.math.function.ByteComparator

    Sorting.mergeSort(stuff, 100, stuff.length);
    for (int x = 100; x < (stuff.length - 1); x++) {
      assertTrue(stuff[x] <= stuff[x + 1]);
    }
   
    ByteComparator revComp = new ByteComparator() {
     
      @Override
      public int compare(byte o1, byte o2) {
        if (o2 < o1) {
          return -1;
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.