Class 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.util.function.Function<java.lang.Object[],​java.lang.Boolean> inputStorage​(uk.ac.starlink.table.ValueInfo[] infos, uk.ac.starlink.table.DomainMapper[] dms)
      Provides a function to turn 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 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BooleanCoord

        public BooleanCoord​(InputMeta meta,
                            boolean isRequired)
        Constructor.
        Parameters:
        meta - input value metadata
        isRequired - true if this coordinate is required for plotting
    • Method Detail

      • inputStorage

        public java.util.function.Function<java.lang.Object[],​java.lang.Boolean> inputStorage​(uk.ac.starlink.table.ValueInfo[] infos,
                                                                                                    uk.ac.starlink.table.DomainMapper[] dms)
        Description copied from interface: Coord
        Provides a function to turn a quantity in the user view to a plotting view object.

        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 Coord.getStorageType(); the return value of the returned function is never null.

        Parameters:
        infos - per-input array of column input metadata
        dms - per-input array of input value->domain value mappers
        Returns:
        input values to storage object conversion function, or null if such conversions will never be possible
      • readBooleanCoord

        public boolean readBooleanCoord​(Tuple tuple,
                                        int icol)
        Reads a boolean value from an appropriate tuple column.
        Parameters:
        tuple - tuple
        icol - index of field in tuple corresponding to this Coord
        Returns:
        value of boolean field