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

Class DummyData

  • All Implemented Interfaces:
    DataSource, java.io.Serializable, java.lang.Iterable<java.lang.Comparable<?>>


    public class DummyData
    extends AbstractDataSource
    Class that represents a data source containing the same value in each cell. It can be used for test purposes or for efficiently creating constant data.
    See Also:
    Serialized Form
    • Constructor Detail

      • DummyData

        public DummyData(int cols,
                         int rows,
                         java.lang.Comparable<?> value)
        Creates a new instance with the specified number of columns and rows, which are filled all over with the same specified value.
        Parameters:
        cols - Number of columns.
        rows - Number of rows.
        value - Value of the cells.
    • Method Detail

      • get

        public java.lang.Comparable<?> get(int col,
                                           int row)
        Returns the row with the specified index.
        Parameters:
        col - index of the column to return
        row - index of the row to return
        Returns:
        the specified value of the data cell
      • getRowCount

        public int getRowCount()
        Returns the number of rows of the data source.
        Returns:
        number of rows in the data source.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.