public interface Coord
inputStorage(uk.ac.starlink.table.ValueInfo[], uk.ac.starlink.table.DomainMapper[])
method provides translation between these
two representations.
An implementation of this class defines an additional
read*Coord(Tuple,int)
method which is able to
read appropriate coordinate values from a suitable field of a
Tuple
. That behaviour is not enforced or defined in this
interface using generic types, partly in order to allow use of
primitive types and eliminate unnecessary use of wrapper classes.
In many cases, both the input and the plotting views will be a scalar,
in which case there will be only one Input.
One notable case for which this is not true is for SkyCoord
,
which has two input coordinates (lat + long) and three storage coordinates
(x, y, z vector).
Modifier and Type | Method and Description |
---|---|
Input[] |
getInputs()
Returns specifications of the one or more input values the user
supplies to provide the data values for this coord.
|
StorageType |
getStorageType()
Returns a code indicating how the quantity defined by this
object is stored internally and presented to the plotting classes.
|
java.util.function.Function<Object[],?> |
inputStorage(ValueInfo[] infos,
DomainMapper[] domainMappers)
Provides a function to turn a quantity in the user view to
a plotting view object.
|
boolean |
isRequired()
Indicates whether this item must have a non-blank value in order
for a plot to be possible.
|
Input[] getInputs()
boolean isRequired()
StorageType getStorageType()
java.util.function.Function<Object[],?> inputStorage(ValueInfo[] infos, DomainMapper[] domainMappers)
The supplied infos
and domainMappers
arrays correspond to
(have the same length as) this object's Inputs array,
and may influence the return values. However, Coord instances
that always behave the same way (for instance whose Input Domains
have fixed DomainMappers) are free to ignore these arguments.
The returned function converts an array of per-input user values
to a storable object of the type corresponding to the result of
getStorageType()
; the return value of the returned function
is never null.
infos
- per-input array of column input metadatadomainMappers
- per-input array of input value->domain value
mappersCopyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.