Class BasicDataset

    • Field Detail

      • xmlReaderPool

        protected static XMLReaderPool xmlReaderPool
        XML Reader pool used for deserializing xml serialized data
      • data

        protected java.lang.Object[][] data
    • Constructor Detail

      • BasicDataset

        public BasicDataset()
      • BasicDataset

        public BasicDataset​(java.lang.String[] columnNames,
                            java.lang.Class<?>[] columnTypes,
                            java.lang.Object[][] data)
      • BasicDataset

        public BasicDataset​(java.util.List<java.lang.String> columnNames,
                            java.util.List<java.lang.Class<?>> columnTypes,
                            java.lang.Object[][] data)
        Constructor that takes all of the information needed to create a populated dataset.
        Parameters:
        columnNames - The column names of the dataset. Must match the length of columnTypes and data.length
        columnTypes - The types of each column. Must match the length of columnNames and data.length
        data - The raw data. An array of columns of data. (NOT rows.)
      • BasicDataset

        @Deprecated
        public BasicDataset​(java.util.List<java.lang.String> columnNames,
                            java.util.List<java.lang.Class<?>> columnTypes,
                            java.lang.Object[][] data,
                            DataQuality[][] quality)
        Deprecated.
        Needed for deserialization backwards compatibility. Do not use this method for new code.
      • BasicDataset

        public BasicDataset​(java.util.List<java.lang.String> columnNames,
                            java.util.List<java.lang.Class<?>> columnTypes)
      • BasicDataset

        public BasicDataset​(java.util.List<java.lang.String> columnNames,
                            java.util.List<java.lang.Class<?>> columnTypes,
                            java.lang.Object[][] data,
                            QualityCode[][] quality)
      • BasicDataset

        public BasicDataset​(@Nonnull
                            Dataset copy)
      • BasicDataset

        public BasicDataset​(java.util.List<java.lang.String> columnNames,
                            java.util.List<java.lang.Class<?>> columnTypes,
                            Dataset copy)
    • Method Detail

      • getValueAt

        public java.lang.Object getValueAt​(int row,
                                           int col)
        Description copied from interface: Dataset
        Returns the value in the dataset at the given location.
      • getRowCount

        public int getRowCount()
        Description copied from interface: Dataset
        Return the number of rows in this dataset
      • setValueAt

        public void setValueAt​(int row,
                               int col,
                               java.lang.Object value)
                        throws java.lang.ClassCastException
        Not part of the public Dataset API
        Throws:
        java.lang.ClassCastException
      • binarySearch

        public int binarySearch​(int column,
                                java.lang.Object key)
        Performs a binary search on the specified column, looking for the specified key. Column MUST be sorted in ascending order with NULL values LAST
        Returns:
        index of the search key, if it is contained in the list; otherwise, (-(insertion point) - 1). The insertion point is defined as the point at which the key would be inserted into the list: the index of the first element greater than the key, or list.size(), if all elements in the list are less than the specified key. Note that this guarantees the return value will be greater than or equal to 0, but only if the key is found.
      • setFromXML

        public void setFromXML​(java.util.List<java.lang.String> columnNames,
                               java.util.List<java.lang.Class<?>> columnTypes,
                               java.lang.String encodedData,
                               int rowCount)
      • getData

        public java.lang.Object[][] getData()
      • setDataDirectly

        public void setDataDirectly​(java.lang.Object[][] list)
        Sets the data array, and fires a change event. The data array of a Dataset is a double object array, with the first index indicating column, and the second indicating row.

        Returns:

      • setData

        @Deprecated
        public void setData​(java.lang.Object[][] list)
        Deprecated.
        This setter function should ONLY BE CALLED DURING DE-SERIALIZATION, which means that you should NEVER CALL THIS FUNCTION DIRECTLY.
        See Also:
        setDataDirectly(Object[][])
      • setAllDirectly

        public void setAllDirectly​(java.util.List<java.lang.String> columnNames,
                                   java.util.List<java.lang.Class<?>> columnTypes,
                                   java.lang.Object[][] data)
        This function was added in 1.5.5 to solve a dataset serialization problem. On a component that starts out with a non-null dataset, during de-serialization, the three set functions were called on that dataset. This caused three fireChange()s, with the first two causing the dataset to be in an inconsistent state. See the DataSetPersistenceDelegate.
      • columnContainsNulls

        public boolean columnContainsNulls​(int col)
      • datasetContainsNulls

        public boolean datasetContainsNulls()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object