Record Class ThemeAudit.Finding

java.lang.Object
java.lang.Record
limn.themeeditor.ThemeAudit.Finding
Record Components:
level - how much it matters
subject - the tone that is hard to see
against - the tone it is hard to see against, or null when metric measures subject on its own. Naming a second tone anyway (the subject twice, or whichever surface seems likely) states a comparison that was never made, and the next reader acts on it
metric - the scale measured and required are on
bound - whether required is a floor or a ceiling
measured - what the palette scored
required - the bar it missed
Enclosing class:
ThemeAudit

public static record ThemeAudit.Finding(ThemeAudit.Level level, Theme.Token subject, Theme.Token against, ThemeAudit.Metric metric, ThemeAudit.Bound bound, double measured, double required) extends Record
One measurement that missed its bar.
  • Constructor Details

    • Finding

      public Finding(ThemeAudit.Level level, Theme.Token subject, Theme.Token against, ThemeAudit.Metric metric, ThemeAudit.Bound bound, double measured, double required)
      Creates an instance of a Finding record class.
      Parameters:
      level - the value for the level record component
      subject - the value for the subject record component
      against - the value for the against record component
      metric - the value for the metric record component
      bound - the value for the bound record component
      measured - the value for the measured record component
      required - the value for the required record component
  • Method Details

    • describe

      public String describe()
      A line an editor can show: "text on surface: 3.21:1, below 4.50:1", or "scrim: 10.20% alpha, below 35.00% alpha" for a tone measured alone.
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • level

      public ThemeAudit.Level level()
      Returns the value of the level record component.
      Returns:
      the value of the level record component
    • subject

      public Theme.Token subject()
      Returns the value of the subject record component.
      Returns:
      the value of the subject record component
    • against

      public Theme.Token against()
      Returns the value of the against record component.
      Returns:
      the value of the against record component
    • metric

      public ThemeAudit.Metric metric()
      Returns the value of the metric record component.
      Returns:
      the value of the metric record component
    • bound

      public ThemeAudit.Bound bound()
      Returns the value of the bound record component.
      Returns:
      the value of the bound record component
    • measured

      public double measured()
      Returns the value of the measured record component.
      Returns:
      the value of the measured record component
    • required

      public double required()
      Returns the value of the required record component.
      Returns:
      the value of the required record component