![JAR search and dependency download from the Maven repository](/logo.png)
com.fillumina.performance.util.interval.DecimalInterval Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of performance-tools Show documentation
Show all versions of performance-tools Show documentation
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;
import java.math.BigDecimal;
/**
*
* @author Francesco Illuminati
*/
public class DecimalInterval
extends AbstractBuildableInterval
implements BuildableInterval, Serializable {
private static final long serialVersionUID = 1L;
public static IntervalBuilder cycle() {
return new IntervalBuilder<>(
new DecimalInterval());
}
private DecimalInterval() {}
@Override
protected boolean isLessThan(final BigDecimal smaller, final BigDecimal bigger) {
return smaller.compareTo(bigger) == -1;
}
@Override
protected BigDecimal calculateCurrent(final BigDecimal first,
final BigDecimal step, final int index) {
return first.add(step.multiply(BigDecimal.valueOf(index)));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy