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

com.fillumina.performance.util.interval.DoubleInterval Maven / Gradle / Ivy

Go to download

Configurable tool to easily compare performances of different code snippets and to take performance telemetry of a running application.

The newest version!
package com.fillumina.performance.util.interval;

import java.io.Serializable;

/**
 *
 * @author Francesco Illuminati
 */
public class DoubleInterval
        extends AbstractBuildableInterval
        implements BuildableInterval, Serializable {
    private static final long serialVersionUID = 1L;

    public static IntervalBuilder cycle() {
        return new IntervalBuilder<>(
                new DoubleInterval());
    }

    private DoubleInterval() {}

    @Override
    protected boolean isLessThan(final Double smaller, final Double bigger) {
        return Double.compare(smaller, bigger) == -1;
    }

    @Override
    protected Double calculateCurrent(final Double first,
            final Double step, final int index) {
        return first + index * step;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy