Class CombinedColumn


  • public class CombinedColumn
    extends java.lang.Object
    Describes an output column formed by aggregation of values from an input expression.
    Since:
    21 Dec 2021
    Author:
    Mark Taylor
    • Constructor Detail

      • CombinedColumn

        public CombinedColumn​(java.lang.String expr,
                              Combiner combiner,
                              java.lang.String name)
        Constructor.
        Parameters:
        expr - expression to be aggregated
        combiner - aggregation method, may be null to indicate default
        name - name of output column, may be null to indicate default
    • Method Detail

      • getExpression

        public java.lang.String getExpression()
        Returns the expression to be aggregated.
        Returns:
        input column name or expression, not null
      • getCombiner

        public Combiner getCombiner()
        Returns the aggregation method.
        Returns:
        aggregation method, or null to indicate default
      • getName

        public java.lang.String getName()
        Returns the output column name.
        Returns:
        output name, or null to indicate default
      • parseSpecification

        public static CombinedColumn parseSpecification​(java.lang.String txt,
                                                        uk.ac.starlink.task.Parameter<?> txtParam,
                                                        uk.ac.starlink.task.ChoiceParameter<Combiner> combinerParam)
                                                 throws uk.ac.starlink.task.ParameterValueException
        Parses an input expression to a CombinedColumn value.
        Parameters:
        txt - input expression
        txtParam - parameter supplying input value, used for reference in thrown exceptions
        combinerParam - parameter supplying combiner values, used to decode combiner specifications
        Throws:
        uk.ac.starlink.task.ParameterValueException
      • createCombinedColumnsParameter

        public static StringMultiParameter createCombinedColumnsParameter​(java.lang.String name,
                                                                          uk.ac.starlink.task.Parameter<Combiner> dfltCombinerParam)
        Creates a parameter for specifying aggregate columns. The parameter return value is an array of strings, each of which can be parsed using the parseSpecification method.
        Parameters:
        name - parameter name
        dfltCombinerParam - parameter used for specifying default aggregation method, used in documentation