Skip to content
Snippets Groups Projects
Commit c63da526 authored by Vojtech Moravec's avatar Vojtech Moravec
Browse files

Refactor Range::getInclusiveTo() to Range::getTo()

Inclusivity or exclusivity of the value is optional.
parent 7bcde119
No related branches found
No related tags found
No related merge requests found
......@@ -53,7 +53,7 @@ abstract class BenchmarkBase {
this.planes = new int[]{ifi.getPlaneIndex()};
} else if (ifi.isPlaneRangeSet()) {
final int from = ifi.getPlaneRange().getFrom();
final int count = ifi.getPlaneRange().getInclusiveTo() - from;
final int count = ifi.getPlaneRange().getTo() - from;
this.planes = new int[count + 1];
for (int i = 0; i <= count; i++) {
......
......@@ -518,7 +518,7 @@ public class ParsedCliOptions extends CompressionOptions implements Cloneable {
if (getInputDataInfo().isPlaneRangeSet()) {
sb.append("FromPlaneIndex: ").append(getInputDataInfo().getPlaneRange().getFrom()).append('\n');
sb.append("ToPlaneIndex: ").append(getInputDataInfo().getPlaneRange().getInclusiveTo()).append('\n');
sb.append("ToPlaneIndex: ").append(getInputDataInfo().getPlaneRange().getTo()).append('\n');
}
sb.append("Verbose: ").append(isVerbose()).append('\n');
......
......@@ -108,7 +108,7 @@ public abstract class CompressorDecompressorBase {
return new int[]{ifi.getPlaneIndex()};
} else if (ifi.isPlaneRangeSet()) {
final int from = ifi.getPlaneRange().getFrom();
final int count = ifi.getPlaneRange().getInclusiveTo() - from;
final int count = ifi.getPlaneRange().getTo() - from;
int[] indices = new int[count + 1];
for (int i = 0; i <= count; i++) {
......
......@@ -128,7 +128,7 @@ public class ImageCompressor extends CompressorDecompressorBase {
return 1;
} else if (options.getInputDataInfo().isPlaneRangeSet()) {
final Range<Integer> planeRange = options.getInputDataInfo().getPlaneRange();
return ((planeRange.getInclusiveTo() + 1) - planeRange.getFrom());
return ((planeRange.getTo() + 1) - planeRange.getFrom());
} else {
return options.getInputDataInfo().getDimensions().getZ();
}
......
......@@ -36,7 +36,7 @@ public final class Range<T extends Comparable<T>> {
*
* @return Inclusive end of the interval.
*/
public final T getInclusiveTo() {
public final T getTo() {
return to;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment