All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.carrotsearch.hppcrt.strategies.DoubleStandardComparator Maven / Gradle / Ivy

Go to download

High Performance Primitive Collections Realtime (fork of HPPC from Carrotsearch) Fundamental data structures (maps, sets, lists, queues, heaps, sorts) generated for combinations of object and primitive types to conserve JVM memory and speed up execution. The Realtime fork intends to extend the existing collections, by tweaking to remove any dynamic allocations at runtime, and to obtain low variance execution times whatever the input nature.

The newest version!
package com.carrotsearch.hppcrt.strategies;

import com.carrotsearch.hppcrt.*;

  
/**
 * Standard  {@link DoubleComparator} for doubles, providing the same behavior as either natural ordering
 * for primitives, or Comparable for objects.
 */
 @javax.annotation.Generated(
    date = "2017-07-11T19:16:33+0200",
    value = "KTypeStandardComparator.java") 
public final class DoubleStandardComparator implements DoubleComparator
{
    public DoubleStandardComparator() {
        // nothing
    }

    @Override
    public int compare(final double e1, final double e2) {

        return (Double.compare((e1) , (e2)));
    }

    @Override
    public boolean equals(final Object o) {

        if (o instanceof DoubleStandardComparator) {

            return true;
        }

        return false;
    }

    @Override
    public int hashCode() {

        return DoubleStandardComparator.class.hashCode();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy