psdi.app.recontask.engine

Class ReconValueSet

  • java.lang.Object
    • psdi.app.recontask.engine.ReconValueSet


  • public class ReconValueSet
    extends java.lang.Object
    • Field Detail

      • attributeNames

        protected java.util.Map attributeNames
        Maps attribute names to indexes in values
      • values

        protected java.util.List values
        the attribute values
      • isDataSet1

        protected boolean isDataSet1
        true when this is for data set1, false if this is for data set2
      • uniqueIdIndex

        protected int uniqueIdIndex
        the index of the mandatory attribute that holds the unique numerical ID of the object
      • objectName

        protected java.lang.String objectName
        the object name
    • Constructor Detail

      • ReconValueSet

        public ReconValueSet(boolean isDataSet1,
                             DataSet dataSet)
        Parameters:
        isDataSet1 -
      • ReconValueSet

        public ReconValueSet(boolean isDataSet1,
                             int initialCapacity)
        Parameters:
        initialCapacity -
        isDataSet1 -
    • Method Detail

      • setObjectName

        public void setObjectName(java.lang.String objectName)
        Parameters:
        objectName - The objectName to set.
      • getObjectName

        public java.lang.String getObjectName()
      • isDataSet1

        public boolean isDataSet1()
        Returns:
        true if the object is for data set1, false if it is for data set2
      • getUniqueIDIndex

        public int getUniqueIDIndex()
      • getAttributeCount

        public int getAttributeCount()
        Returns:
      • getIndexOfAttribute

        public int getIndexOfAttribute(java.lang.String attributeName)
        Parameters:
        attributeName -
        Returns:
        the index of the attribute
        Throws:
        IllegalArgumentException - if attributeName is null
        NoSuchElementException - if attributeName is not found
      • getValue

        public ReconValue getValue(int index)
        Access to an object instance within the set
        Parameters:
        index -
        Returns:
        the object at the given index
      • getValueCount

        public int getValueCount()
        Returns:
        the number of objects
      • addAttribute

        public void addAttribute(java.lang.String attributeName)
        Add an attribute definition (for all contained attributes)
        Parameters:
        attributeName - the attribute name to be added
        Throws:
        IllegalArgumentException - if the attribute is added after there are some objects in the container
      • clearValues

        public void clearValues()
        Reset all value data, without touching the atribute definition
      • addValue

        public ReconValue addValue(java.lang.Object[] values)
        Assign attribute values to the object
        Parameters:
        values - an array of values that are copied to the new object
        Throws:
        IllegalArgumentException - if values contains a different number of objects than the object has attributes
      • addValue

        public ReconValue addValue(java.lang.Object[] values,
                                   java.lang.Object[] units)
        Assign attribute values and their units to the object
        Parameters:
        values - an array of values that are copied to the new object
        values - an array of units that are copied to the new object
        Throws:
        IllegalArgumentException - if values or units contains a different number of objects than the object has attributes
      • addValue

        public ReconValue addValue(ReconValue valueContainer)
        Attach an existing attribute values object to the set
        Parameters:
        valueContainer - an existing attribute values object to the set. The valueContainer object must have its name properly set
        Throws:
        IllegalArgumentException - if valueContainer is null or has a different name
      • getShallowCopyOValuesContainer

        public java.util.List getShallowCopyOValuesContainer()
        Returns:
        new list with references to the objects in the values container
      • iterator

        public java.util.Iterator iterator()
        Returns:
        iterator to the contained ReconValue collection
      • getDataSet

        public DataSet getDataSet()
        Returns the embedded copy of the DataSet object.
        Returns:
        - DataSet - the data set.