Package limn.accessibility
Record Class ToggleFacet
java.lang.Object
java.lang.Record
limn.accessibility.ToggleFacet
- Record Components:
state- whether the node is off, on, or neither
A node that carries a checked state: a checkbox, a switch, a check menu item, a toggle button.
It is a facet rather than a flag because checked-ness has three homes across the three platforms — a pattern object on one, a state bit plus an action row on another, a value attribute on the third — and each of those views is derived from this one record.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionToggleFacet(ToggleFacet.State state) Creates an instance of aToggleFacetrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.state()Returns the value of thestaterecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ToggleFacet
Creates an instance of aToggleFacetrecord class.- Parameters:
state- the value for thestaterecord component
-
-
Method Details
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-