Package limn.themeeditor
Record Class ThemeAudit.Finding
java.lang.Object
java.lang.Record
limn.themeeditor.ThemeAudit.Finding
- Record Components:
level- how much it matterssubject- the tone that is hard to seeagainst- the tone it is hard to see against, ornullwhenmetricmeasuressubjecton 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 itmetric- the scalemeasuredandrequiredare onbound- whetherrequiredis a floor or a ceilingmeasured- what the palette scoredrequired- 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 Summary
ConstructorsConstructorDescriptionFinding(ThemeAudit.Level level, Theme.Token subject, Theme.Token against, ThemeAudit.Metric metric, ThemeAudit.Bound bound, double measured, double required) Creates an instance of aFindingrecord class. -
Method Summary
Modifier and TypeMethodDescriptionagainst()Returns the value of theagainstrecord component.bound()Returns the value of theboundrecord component.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.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.level()Returns the value of thelevelrecord component.doublemeasured()Returns the value of themeasuredrecord component.metric()Returns the value of themetricrecord component.doublerequired()Returns the value of therequiredrecord component.subject()Returns the value of thesubjectrecord component.final StringtoString()Returns a string representation of this record class.
-
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 aFindingrecord class.- Parameters:
level- the value for thelevelrecord componentsubject- the value for thesubjectrecord componentagainst- the value for theagainstrecord componentmetric- the value for themetricrecord componentbound- the value for theboundrecord componentmeasured- the value for themeasuredrecord componentrequired- the value for therequiredrecord component
-
-
Method Details
-
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
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
level
Returns the value of thelevelrecord component.- Returns:
- the value of the
levelrecord component
-
subject
Returns the value of thesubjectrecord component.- Returns:
- the value of the
subjectrecord component
-
against
Returns the value of theagainstrecord component.- Returns:
- the value of the
againstrecord component
-
metric
Returns the value of themetricrecord component.- Returns:
- the value of the
metricrecord component
-
bound
Returns the value of theboundrecord component.- Returns:
- the value of the
boundrecord component
-
measured
public double measured()Returns the value of themeasuredrecord component.- Returns:
- the value of the
measuredrecord component
-
required
public double required()Returns the value of therequiredrecord component.- Returns:
- the value of the
requiredrecord component
-