Documentation of 'de.erichseifert.gral.data.AbstractDataSource' Java class
AbstractDataSource
de.erichseifert.gral.data

Class AbstractDataSource

    • Constructor Summary

      Constructors 
      Constructor and Description
      AbstractDataSource() 
      AbstractDataSource(java.lang.Class<? extends java.lang.Comparable<?>>... types)
      Initializes a new instance with the specified number of columns and column types.
      AbstractDataSource(Column... remainingColumns) 
      AbstractDataSource(java.lang.String name, java.lang.Class<? extends java.lang.Comparable<?>>... types)
      Initializes a new instance with the specified name, number of columns, and column types.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addDataListener(DataListener dataListener)
      Adds the specified DataListener to this data source.
      Column<?> getColumn(int col)
      Returns the column with the specified index.
      int getColumnCount()
      Returns the number of columns of the data source.
      DataSource getColumnStatistics(java.lang.String key) 
      java.lang.Class<? extends java.lang.Comparable<?>>[] getColumnTypes()
      Returns the data types of all columns.
      java.lang.String getName()
      Returns the name of this series.
      Record getRecord(int row) 
      Row getRow(int row)
      Returns the row with the specified index.
      DataSource getRowStatistics(java.lang.String key) 
      Statistics getStatistics()
      Retrieves a object instance that contains various statistical information on the current data source.
      boolean isColumnNumeric(int columnIndex)
      Returns whether the column at the specified index contains numbers.
      java.util.Iterator<java.lang.Comparable<?>> iterator()
      Returns an iterator over a set of elements of type T.
      void removeDataListener(DataListener dataListener)
      Removes the specified DataListener from this data source.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • AbstractDataSource

        public AbstractDataSource()
      • AbstractDataSource

        public AbstractDataSource(java.lang.String name,
                                  java.lang.Class<? extends java.lang.Comparable<?>>... types)
        Initializes a new instance with the specified name, number of columns, and column types.
        Parameters:
        name - name of the DataSource
        types - type for each column
      • AbstractDataSource

        public AbstractDataSource(java.lang.Class<? extends java.lang.Comparable<?>>... types)
        Initializes a new instance with the specified number of columns and column types.
        Parameters:
        types - type for each column
      • AbstractDataSource

        public AbstractDataSource(Column... remainingColumns)
    • Method Detail

      • getStatistics

        public Statistics getStatistics()
        Retrieves a object instance that contains various statistical information on the current data source.
        Specified by:
        getStatistics in interface DataSource
        Returns:
        statistical information
      • addDataListener

        public void addDataListener(DataListener dataListener)
        Adds the specified DataListener to this data source.
        Specified by:
        addDataListener in interface DataSource
        Parameters:
        dataListener - listener to be added.
      • removeDataListener

        public void removeDataListener(DataListener dataListener)
        Removes the specified DataListener from this data source.
        Specified by:
        removeDataListener in interface DataSource
        Parameters:
        dataListener - listener to be removed.
      • iterator

        public java.util.Iterator<java.lang.Comparable<?>> iterator()
        Returns an iterator over a set of elements of type T.
        Specified by:
        iterator in interface java.lang.Iterable<java.lang.Comparable<?>>
        Returns:
        an Iterator.
      • getColumn

        public Column<?> getColumn(int col)
        Returns the column with the specified index.
        Specified by:
        getColumn in interface DataSource
        Parameters:
        col - index of the column to return
        Returns:
        the specified column of the data source
      • getName

        public java.lang.String getName()
        Description copied from interface: DataSource
        Returns the name of this series.
        Specified by:
        getName in interface DataSource
        Returns:
        a name string
      • getColumnCount

        public int getColumnCount()
        Returns the number of columns of the data source.
        Specified by:
        getColumnCount in interface DataSource
        Returns:
        number of columns in the data source.
      • getColumnTypes

        public java.lang.Class<? extends java.lang.Comparable<?>>[] getColumnTypes()
        Returns the data types of all columns.
        Specified by:
        getColumnTypes in interface DataSource
        Returns:
        The data types of all column in the data source
      • isColumnNumeric

        public boolean isColumnNumeric(int columnIndex)
        Returns whether the column at the specified index contains numbers.
        Specified by:
        isColumnNumeric in interface DataSource
        Parameters:
        columnIndex - Index of the column to test.
        Returns:
        true if the column is numeric, otherwise false.
      • getRow

        public Row getRow(int row)
        Returns the row with the specified index.
        Specified by:
        getRow in interface DataSource
        Parameters:
        row - Index of the row to return
        Returns:
        the Specified row of the data source

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.