Package uk.ac.starlink.ttools.plot2
Interface Ranger
-
- All Known Implementing Classes:
BasicRanger
,HistoRanger
public interface Ranger
Accumulates a set of data values to provide range information.- Since:
- 14 Mar 2019
- Author:
- Mark Taylor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
add(Ranger other)
Merges the contents of the supplied ranger into this one.Ranger
createCompatibleRanger()
Returns a Ranger instance that is compatible with this one.Span
createSpan()
Returns an object characterising the range of data submitted so far.void
submitDatum(double d)
Accepts a data value.
-
-
-
Method Detail
-
submitDatum
void submitDatum(double d)
Accepts a data value.- Parameters:
d
- datum
-
createSpan
Span createSpan()
Returns an object characterising the range of data submitted so far. This should not be called while another thread might be callingsubmitDatum(double)
.- Returns:
- span of accumulated data
-
add
void add(Ranger other)
Merges the contents of the supplied ranger into this one. The effect is as if all the results accumulated into other had been accumulated into this one. The effect on the supplied other is undefined.The supplied ranger is assumed to be compatible with this one, which probably means created in the same way. If not, some RuntimeException such as a ClassCastException may result.
- Parameters:
other
- compatible ranger instance
-
createCompatibleRanger
Ranger createCompatibleRanger()
Returns a Ranger instance that is compatible with this one. It has no content (does not copy any data from this one), but the two may be merged using theadd(uk.ac.starlink.ttools.plot2.Ranger)
method.- Returns:
- new compatible ranger instance
-
-