Class NumericRowWriter


  • public final class NumericRowWriter
    extends java.lang.Object
    Writer to create a Table from row-wise numeric data.
    Author:
    Gisa Meier, Kevin Majchrzak
    See Also:
    Writers
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Table create()
      Creates a Table from the data inside the row writer.
      void move()
      Moves the reader to the next row.
      void set​(int index, double value)
      Sets the value at the given column index.
      java.lang.String toString()  
      int width()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • move

        public void move()
        Moves the reader to the next row.
      • set

        public void set​(int index,
                        double value)
        Sets the value at the given column index. This method is well-defined for indices zero (including) to width() (excluding).

        This method does not perform any range checks. Nor does it ever advance the current row. Before invoking this method, you will have to call move() at least once.

        Parameters:
        index - the column index
        value - the value to set
      • create

        public Table create()
        Creates a Table from the data inside the row writer. The row writer cannot be changed afterwards.
        Returns:
        a new table
        Throws:
        java.lang.IllegalArgumentException - if the stored column labels are not valid to create a table
      • width

        public int width()
        Returns:
        the number of values per row
      • toString

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