Class MultiKeyPlanItData


  • public class MultiKeyPlanItData
    extends Object
    Class which holds arrays of output property values, identified by arrays of output keys This class is a wrapper for the MultiKeyMap object which is a Map with multiple keys. This class has input and output methods which are specific to PlanIt output properties.
    Author:
    gman6028
    • Constructor Detail

      • MultiKeyPlanItData

        public MultiKeyPlanItData​(OutputProperty[] outputKeyProperties,
                                  OutputProperty... outputValueProperties)
                           throws PlanItException
        Constructor
        Parameters:
        outputKeyProperties - OutputProperty types of keys
        outputValueProperties - OutputProperty types of values
        Throws:
        PlanItException - thrown if there is an error
      • MultiKeyPlanItData

        public MultiKeyPlanItData​(OutputProperty outputKeyProperty1,
                                  OutputProperty... outputValueProperties)
                           throws PlanItException
        Constructor
        Parameters:
        outputKeyProperty1 - first output key property
        outputValueProperties - OutputProperty types of values
        Throws:
        PlanItException - thrown if there is an error
      • MultiKeyPlanItData

        public MultiKeyPlanItData​(OutputProperty outputKeyProperty1,
                                  OutputProperty outputKeyProperty2,
                                  OutputProperty... outputValueProperties)
                           throws PlanItException
        Constructor
        Parameters:
        outputKeyProperty1 - first output key property
        outputKeyProperty2 - second output key property
        outputValueProperties - OutputProperty types of values
        Throws:
        PlanItException - thrown if there is an error
      • MultiKeyPlanItData

        public MultiKeyPlanItData​(OutputProperty outputKeyProperty1,
                                  OutputProperty outputKeyProperty2,
                                  OutputProperty outputKeyProperty3,
                                  OutputProperty... outputValueProperties)
                           throws PlanItException
        Constructor
        Parameters:
        outputKeyProperty1 - first output key property
        outputKeyProperty2 - second output key property
        outputKeyProperty3 - third output key property
        outputValueProperties - OutputProperty types of values
        Throws:
        PlanItException - thrown if there is an error
    • Method Detail

      • getRowValues

        public Object[] getRowValues​(Object... keyValues)
                              throws PlanItException
        Returns an array representing the row of data values defined by the specified array of key values
        Parameters:
        keyValues - array storing the key values
        Returns:
        array storing the data values
        Throws:
        PlanItException - thrown if the key values array is invalid
      • getRowValue

        public Object getRowValue​(OutputPropertyType outputProperty,
                                  Object... keyValues)
                           throws PlanItException
        Get data value for a specified row and column
        Parameters:
        outputProperty - output property of the required column
        keyValues - array storing the key values
        Returns:
        the value of the specified cell
        Throws:
        PlanItException - thrown if there is an error
      • putRow

        public void putRow​(Object[] outputValues,
                           Object... keyValues)
                    throws PlanItException
        Puts the data values into a specified row
        Parameters:
        outputValues - array storing the data values
        keyValues - array storing the key values to specify a row
        Throws:
        PlanItException - thrown if there is an error
      • putRowValue

        public void putRowValue​(OutputPropertyType outputProperty,
                                Object value,
                                Object... keyValues)
                         throws PlanItException
        Set the data value for an individual cell
        Parameters:
        outputProperty - output property value specifying the column
        value - data value to be inserted
        keyValues - array of key values specifying the row
        Throws:
        PlanItException - thrown if there is an error
      • getIterator

        public MultiKeyPlanItDataIterator getIterator()
        Returns a MultiKeyPlanItDataIterator for the contents of this map
        Returns:
        MultiKeyPlanItDataIterator which loops through the keys and values of this map
      • getPositionOfOutputValueProperty

        public int getPositionOfOutputValueProperty​(OutputPropertyType outputValueProperty)
                                             throws PlanItException
        Get the position of a property type in the output values property array
        Parameters:
        outputValueProperty - the output value property
        Returns:
        the position of the output value property in the output values property array
        Throws:
        PlanItException - thrown if the output property type is not in the output values property array
      • getPositionOfOutputKeyProperty

        public int getPositionOfOutputKeyProperty​(OutputPropertyType outputKeyProperty)
                                           throws PlanItException
        Get the position of a property type in the output keys property array
        Parameters:
        outputKeyProperty - the output value property
        Returns:
        the position of the output key property in the output keys property array
        Throws:
        PlanItException - thrown if the output property type is not in the output keys property array