Interface Dataset

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default int binarySearch​(int column, java.lang.Object key)
      Performs a binary search on the specified column, looking for the specified key.
      default java.util.List<java.lang.Object> getColumnAsList​(int col)  
      int getColumnCount()
      Returns the number of columns.
      int getColumnIndex​(java.lang.String name)
      Returns the index of the given column, case insensitive
      java.lang.String getColumnName​(int col)
      Returns the name of the given column.
      java.util.List<java.lang.String> getColumnNames()
      Returns an unmodifiable list of this dataset's column names, in order.
      java.lang.Class<?> getColumnType​(int col)
      Returns the type of the given column.
      java.util.List<java.lang.Class<?>> getColumnTypes()
      Returns an unmodifiable list of this dataset's column types, in order.
      double getPrimitiveValueAt​(int row, int col)
      If the given column is a numeric type or a Date, then the value will be returned as a double.
      QualityCode getQualityAt​(int row, int col)
      Returns the quality of the value at the given location.
      int getRowCount()
      Return the number of rows in this dataset
      java.lang.Object getValueAt​(int row, int col)
      Returns the value in the dataset at the given location.
      java.lang.Object getValueAt​(int row, java.lang.String colName)
      Returns the value at the given row and at a column named colName.
    • Method Detail

      • getColumnNames

        java.util.List<java.lang.String> getColumnNames()
        Returns an unmodifiable list of this dataset's column names, in order.
      • getColumnTypes

        java.util.List<java.lang.Class<?>> getColumnTypes()
        Returns an unmodifiable list of this dataset's column types, in order.
      • getColumnCount

        int getColumnCount()
        Returns the number of columns.
      • getRowCount

        int getRowCount()
        Return the number of rows in this dataset
      • getColumnAsList

        default java.util.List<java.lang.Object> getColumnAsList​(int col)
      • getColumnIndex

        int getColumnIndex​(java.lang.String name)
        Returns the index of the given column, case insensitive
        Parameters:
        name - the name of the column to look upw
        Returns:
        the index of the column
        Throws:
        java.lang.ArrayIndexOutOfBoundsException - if the column isn't found
      • getColumnName

        java.lang.String getColumnName​(int col)
        Returns the name of the given column.
      • getColumnType

        java.lang.Class<?> getColumnType​(int col)
        Returns the type of the given column.
      • getValueAt

        java.lang.Object getValueAt​(int row,
                                    int col)
        Returns the value in the dataset at the given location.
      • getQualityAt

        QualityCode getQualityAt​(int row,
                                 int col)
        Returns the quality of the value at the given location.
      • getValueAt

        java.lang.Object getValueAt​(int row,
                                    java.lang.String colName)
        Returns the value at the given row and at a column named colName. Column name matching is case insensitive.
        Throws:
        java.lang.ArrayIndexOutOfBoundsException - if the column isn't found
      • getPrimitiveValueAt

        double getPrimitiveValueAt​(int row,
                                   int col)
        If the given column is a numeric type or a Date, then the value will be returned as a double. (Charts uses this functionality to provide a seamless interface with certain optimized dataset implementations.
      • binarySearch

        default 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. Dataset provides an inefficient default implementation of binary search that allocates a new array list for the entire column.
        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.