Record Class PlotTable.Selection

java.lang.Object
java.lang.Record
com.eco.bio7.spatial.PlotTable.Selection
Enclosing class:
PlotTable

public static record PlotTable.Selection(PlotTable table, String[] roles, int[] columns, PlotTable.Options options) extends Record
The selected columns of the roles of a plot.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Selection(PlotTable table, String[] roles, int[] columns, PlotTable.Options options)
    Creates an instance of a Selection record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(Plot3D plot)
    Applies the settings of the dialog to a plot: the title, the axis titles, the logarithmic axes and the export action (the color map see colorMap).
    int[]
    The color map of the dialog (e.g., PlotLegend.VIRIDIS).
    int[]
    Returns the value of the columns record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    boolean
    has(int role)
    True if a column is selected for the role (an optional role can be empty).
    final int
    Returns a hash code value for this object.
    name(int role)
    The name of the column of the role (e.g., for the title of an axis).
    double[]
    numbers(int role)
    The numbers of the column of the role.
    Returns the value of the options record component.
    Returns the value of the roles record component.
    Returns the value of the table record component.
    texts(int role)
    The texts of the column of the role.
    The title of the dialog (lines separated with \n).
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Selection

      public Selection(PlotTable table, String[] roles, int[] columns, PlotTable.Options options)
      Creates an instance of a Selection record class.
      Parameters:
      table - the value for the table record component
      roles - the value for the roles record component
      columns - the value for the columns record component
      options - the value for the options record component
  • Method Details

    • apply

      public Plot3D apply(Plot3D plot)
      Applies the settings of the dialog to a plot: the title, the axis titles, the logarithmic axes and the export action (the color map see colorMap).
      Parameters:
      plot - the plot
      Returns:
      the plot
    • colorMap

      public int[] colorMap()
      The color map of the dialog (e.g., PlotLegend.VIRIDIS).
    • title

      public String title()
      The title of the dialog (lines separated with \n).
    • has

      public boolean has(int role)
      True if a column is selected for the role (an optional role can be empty).
    • numbers

      public double[] numbers(int role)
      The numbers of the column of the role.
    • texts

      public String[] texts(int role)
      The texts of the column of the role.
    • name

      public String name(int role)
      The name of the column of the role (e.g., for the title of an axis).
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • table

      public PlotTable table()
      Returns the value of the table record component.
      Returns:
      the value of the table record component
    • roles

      public String[] roles()
      Returns the value of the roles record component.
      Returns:
      the value of the roles record component
    • columns

      public int[] columns()
      Returns the value of the columns record component.
      Returns:
      the value of the columns record component
    • options

      public PlotTable.Options options()
      Returns the value of the options record component.
      Returns:
      the value of the options record component