Package uk.ac.starlink.ttools.plot2
Class RangeCollector<S extends uk.ac.starlink.util.Splittable<S>>
java.lang.Object
uk.ac.starlink.ttools.plot2.RangeCollector<S>
- All Implemented Interfaces:
uk.ac.starlink.util.SplitCollector<S,
Range[]>
public abstract class RangeCollector<S extends uk.ac.starlink.util.Splittable<S>>
extends Object
implements uk.ac.starlink.util.SplitCollector<S,Range[]>
Partial SplitCollector implementation for accumulating range data.
The
accumulate
method should be implemented
to submit values to an N-element array of ranges.
On completion, the mergeRanges(uk.ac.starlink.ttools.plot.Range[], uk.ac.starlink.ttools.plot.Range[])
method may be used
to update a supplied Range array with the collected result.
- Since:
- 22 Jan 2021
- Author:
- Mark Taylor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRange[]
Range[]
void
mergeRanges
(Range[] ranges0, Range[] ranges1) Merges the content of the second range into the first one.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface uk.ac.starlink.util.SplitCollector
accumulate
-
Constructor Details
-
RangeCollector
protected RangeCollector(int ndim) Constructor.- Parameters:
ndim
- number of range objects (data dimensions)
-
-
Method Details
-
createAccumulator
-
combine
-
mergeRanges
Merges the content of the second range into the first one.- Parameters:
ranges0
- first input range, modified on exitranges1
- second input range, unmodified on exit
-