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

Rename class Interval<T> to Range<T>

parent d92fa538
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,7 @@ package azgracompress.cli; ...@@ -3,7 +3,7 @@ package azgracompress.cli;
import azgracompress.ScifioWrapper; import azgracompress.ScifioWrapper;
import azgracompress.compression.CompressionOptions; import azgracompress.compression.CompressionOptions;
import azgracompress.compression.CompressorDecompressorBase; import azgracompress.compression.CompressorDecompressorBase;
import azgracompress.compression.Interval; import azgracompress.compression.Range;
import azgracompress.data.V2i; import azgracompress.data.V2i;
import azgracompress.data.V3i; import azgracompress.data.V3i;
import azgracompress.fileformat.FileExtensions; import azgracompress.fileformat.FileExtensions;
...@@ -308,7 +308,7 @@ public class ParsedCliOptions extends CompressionOptions implements Cloneable { ...@@ -308,7 +308,7 @@ public class ParsedCliOptions extends CompressionOptions implements Cloneable {
final Optional<Integer> indexToResult = ParseUtils.tryParseInt(toIndexString); final Optional<Integer> indexToResult = ParseUtils.tryParseInt(toIndexString);
if (indexFromResult.isPresent() && indexToResult.isPresent()) { if (indexFromResult.isPresent() && indexToResult.isPresent()) {
getInputDataInfo().setPlaneRange(new Interval<>(indexFromResult.get(), indexToResult.get())); getInputDataInfo().setPlaneRange(new Range<>(indexFromResult.get(), indexToResult.get()));
} else { } else {
parseErrorOccurred = true; parseErrorOccurred = true;
errorBuilder.append("Plane range index is wrong. Expected format D-D, got: ").append( errorBuilder.append("Plane range index is wrong. Expected format D-D, got: ").append(
......
package azgracompress.compression; package azgracompress.compression;
import azgracompress.compression.exception.ImageCompressionException; import azgracompress.compression.exception.ImageCompressionException;
import azgracompress.compression.listeners.IProgressListener;
import azgracompress.compression.listeners.IStatusListener;
import azgracompress.fileformat.QCMPFileHeader; import azgracompress.fileformat.QCMPFileHeader;
import java.io.*; import java.io.*;
...@@ -129,7 +127,7 @@ public class ImageCompressor extends CompressorDecompressorBase { ...@@ -129,7 +127,7 @@ public class ImageCompressor extends CompressorDecompressorBase {
if (options.getInputDataInfo().isPlaneIndexSet()) { if (options.getInputDataInfo().isPlaneIndexSet()) {
return 1; return 1;
} else if (options.getInputDataInfo().isPlaneRangeSet()) { } else if (options.getInputDataInfo().isPlaneRangeSet()) {
final Interval<Integer> planeRange = options.getInputDataInfo().getPlaneRange(); final Range<Integer> planeRange = options.getInputDataInfo().getPlaneRange();
return ((planeRange.getInclusiveTo() + 1) - planeRange.getFrom()); return ((planeRange.getInclusiveTo() + 1) - planeRange.getFrom());
} else { } else {
return options.getInputDataInfo().getDimensions().getZ(); return options.getInputDataInfo().getDimensions().getZ();
......
package azgracompress.compression; package azgracompress.compression;
public class Interval<T extends Comparable<T>> { public class Range<T extends Comparable<T>> {
/** /**
* Start of the interval. * Start of the interval.
*/ */
...@@ -16,7 +16,7 @@ public class Interval<T extends Comparable<T>> { ...@@ -16,7 +16,7 @@ public class Interval<T extends Comparable<T>> {
* @param from Start of the interval, * @param from Start of the interval,
* @param to Inclusive end of the interval. * @param to Inclusive end of the interval.
*/ */
public Interval(T from, T to) { public Range(T from, T to) {
this.from = from; this.from = from;
this.to = to; this.to = to;
} }
......
package azgracompress.io; package azgracompress.io;
import azgracompress.compression.Interval; import azgracompress.compression.Range;
import azgracompress.data.V3i; import azgracompress.data.V3i;
/** /**
...@@ -42,7 +42,7 @@ public abstract class InputData { ...@@ -42,7 +42,7 @@ public abstract class InputData {
/** /**
* Range of the planes to compress. * Range of the planes to compress.
*/ */
Interval<Integer> planeRange = null; Range<Integer> planeRange = null;
public boolean isPlaneIndexSet() { public boolean isPlaneIndexSet() {
...@@ -70,11 +70,11 @@ public abstract class InputData { ...@@ -70,11 +70,11 @@ public abstract class InputData {
this.planeIndex = planeIndex; this.planeIndex = planeIndex;
} }
public Interval<Integer> getPlaneRange() { public Range<Integer> getPlaneRange() {
return planeRange; return planeRange;
} }
public void setPlaneRange(Interval<Integer> planeRange) { public void setPlaneRange(Range<Integer> planeRange) {
this.planeRange = planeRange; this.planeRange = planeRange;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment