Class DataSet2D

  • All Implemented Interfaces:
    java.lang.Iterable<Data2D>

    public class DataSet2D
    extends java.lang.Object
    implements java.lang.Iterable<Data2D>
    The class data set 2D
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.awt.geom.Point2D.Double emptyMax  
      static java.awt.geom.Point2D.Double emptyMin  
      java.lang.String title  
      java.lang.String xlabel  
      java.lang.String ylabel  
    • Constructor Summary

      Constructors 
      Constructor Description
      DataSet2D​(java.lang.String title, java.lang.String xlabel, java.lang.String ylabel)
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addComment​(java.lang.String comment)
      Add the comment into the array list for the comments
      void addData​(java.lang.String legend, java.lang.String type, java.awt.Color color)
      Add a new data
      void addData2D​(Data2D data2d)
      Add the data2D
      void addSample​(double x, double y)
      Add a new sample
      void addSample​(java.awt.geom.Point2D.Double p)
      Add a new sample into the array list of the Data2D
      java.util.ArrayList<java.lang.String> getComments()
      Get comments
      java.awt.geom.Point2D.Double getMaximum()
      Get the maximum data2D
      double getMaxXDifference()
      Get the maximum difference between a lot of the data2D
      java.awt.geom.Point2D.Double getMinimum()
      Get the minimum data2D
      java.lang.String getTitle()
      Get the title
      java.lang.String getXLabel()
      Get the label x
      java.lang.String getYLabel()
      Get the label y
      boolean isEmpty()
      Is the array list of the data2D empty?
      java.util.Iterator<Data2D> iterator()  
      void removeData2D​(Data2D data2d)
      Remove the Data2D
      void setLogX​(boolean logx)
      Set the log x into the data2D
      void setLogY​(boolean logy)
      Set log y
      void setTitle​(java.lang.String newtitle)
      Set title
      void setXLabel​(java.lang.String newx)
      Set the label x into the data2D
      void setYLabel​(java.lang.String newy)
      Set the label y into the data2D
      int size()
      Ask the data size
      • Methods inherited from class java.lang.Object

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

        forEach, spliterator
    • Field Detail

      • emptyMin

        public static final java.awt.geom.Point2D.Double emptyMin
      • emptyMax

        public static final java.awt.geom.Point2D.Double emptyMax
      • title

        public java.lang.String title
      • xlabel

        public java.lang.String xlabel
      • ylabel

        public java.lang.String ylabel
    • Constructor Detail

      • DataSet2D

        public DataSet2D​(java.lang.String title,
                         java.lang.String xlabel,
                         java.lang.String ylabel)
        Constructor
        Parameters:
        title - - The title string
        xlabel - - The label x
        ylabel - - The label y
    • Method Detail

      • addData

        public void addData​(java.lang.String legend,
                            java.lang.String type,
                            java.awt.Color color)
        Add a new data
        Parameters:
        legend - - The legend data
        type - - The type of the data
        color - - The color
      • setTitle

        public void setTitle​(java.lang.String newtitle)
        Set title
        Parameters:
        newtitle - - The new title
      • setXLabel

        public void setXLabel​(java.lang.String newx)
        Set the label x into the data2D
        Parameters:
        newx - - The new label x
      • setYLabel

        public void setYLabel​(java.lang.String newy)
        Set the label y into the data2D
        Parameters:
        newy - - The new label y
      • setLogX

        public void setLogX​(boolean logx)
        Set the log x into the data2D
        Parameters:
        logx - - Set the log x?
      • setLogY

        public void setLogY​(boolean logy)
        Set log y
        Parameters:
        logy - - Set the log y ?
      • addData2D

        public void addData2D​(Data2D data2d)
        Add the data2D
        Parameters:
        data2d - - The input data
      • removeData2D

        public void removeData2D​(Data2D data2d)
        Remove the Data2D
        Parameters:
        data2d - - Remove this data
      • isEmpty

        public boolean isEmpty()
        Is the array list of the data2D empty?
        Returns:
        true - empty
      • size

        public int size()
        Ask the data size
        Returns:
        data.size
      • addSample

        public void addSample​(java.awt.geom.Point2D.Double p)
        Add a new sample into the array list of the Data2D
        Parameters:
        p - - The data2D
      • addSample

        public void addSample​(double x,
                              double y)
        Add a new sample
        Parameters:
        x - - The log x value
        y - - The log y value
      • addComment

        public void addComment​(java.lang.String comment)
        Add the comment into the array list for the comments
        Parameters:
        comment - - The comment string
      • getComments

        public java.util.ArrayList<java.lang.String> getComments()
        Get comments
        Returns:
        Comments - The array list for the comments
      • getTitle

        public java.lang.String getTitle()
        Get the title
        Returns:
        title - The title string
      • getXLabel

        public java.lang.String getXLabel()
        Get the label x
        Returns:
        xLabel - The label x
      • getYLabel

        public java.lang.String getYLabel()
        Get the label y
        Returns:
        yLabel - The label y
      • getMinimum

        public java.awt.geom.Point2D.Double getMinimum()
        Get the minimum data2D
        Returns:
        min - the minimum data2D
      • getMaximum

        public java.awt.geom.Point2D.Double getMaximum()
        Get the maximum data2D
        Returns:
        max - The maximum data2D
      • getMaxXDifference

        public double getMaxXDifference()
        Get the maximum difference between a lot of the data2D
        Returns:
        max - The max data2D
      • iterator

        public java.util.Iterator<Data2D> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<Data2D>