Package uk.ac.starlink.ttools.plot2.data
Class BooleanCoord
- java.lang.Object
-
- uk.ac.starlink.ttools.plot2.data.SingleCoord
-
- uk.ac.starlink.ttools.plot2.data.BooleanCoord
-
- All Implemented Interfaces:
Coord
public class BooleanCoord extends SingleCoord
Coord implementation for single boolean values.- Since:
- 4 Feb 2013
- Author:
- Mark Taylor
-
-
Constructor Summary
Constructors Constructor Description BooleanCoord(InputMeta meta, boolean isRequired)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
inputToStorage(java.lang.Object[] inputValues, uk.ac.starlink.table.DomainMapper[] mappers)
Turns a quantity in the user view to a plotting view object.boolean
readBooleanCoord(Tuple tuple, int icol)
Reads a boolean value from an appropriate tuple column.-
Methods inherited from class uk.ac.starlink.ttools.plot2.data.SingleCoord
getInput, getInputs, getStorageType, isRequired
-
-
-
-
Constructor Detail
-
BooleanCoord
public BooleanCoord(InputMeta meta, boolean isRequired)
Constructor.- Parameters:
meta
- input value metadataisRequired
- true if this coordinate is required for plotting
-
-
Method Detail
-
inputToStorage
public java.lang.Object inputToStorage(java.lang.Object[] inputValues, uk.ac.starlink.table.DomainMapper[] mappers)
Description copied from interface:Coord
Turns a quantity in the user view to a plotting view object. The return value is never null.The supplied parameters both correspond (have the same length as) this object's Inputs array. For each Input, the corresponding element of the
inputValues
array gives the value obtained from the user-supplied data (matchingInput.getValueClass()
), and the corresponding element of theinputMappers
array gives a DomainMapper object (consistent withInput.getDomain()
). InputMappers may be null however, and in many cases, coordinates are not sensitive to domains, and for those cases implementations will ignoreinputMappers
.- Parameters:
inputValues
- per-input valuesmappers
- per-input domain mappers, each may be null- Returns:
- object of the type corresponding to the result of
Coord.getStorageType()
; not null
-
readBooleanCoord
public boolean readBooleanCoord(Tuple tuple, int icol)
Reads a boolean value from an appropriate tuple column.- Parameters:
tuple
- tupleicol
- index of field in tuple corresponding to this Coord- Returns:
- value of boolean field
-
-