Package su.onno.ui
Record Class UiActionResolver.RecordActionState
java.lang.Object
java.lang.Record
su.onno.ui.UiActionResolver.RecordActionState
- Enclosing class:
UiActionResolver
public static record UiActionResolver.RecordActionState(boolean visible, boolean enabled, String label, String icon)
extends Record
A DETAIL action's per-record resolution (issue #255): the same
visibleWhen /
enabledWhen / label(fn) / icon(fn) functions a ROW action evaluates
per list row, evaluated once against the loaded detail record. label/icon
fall back to the fixed values; a function that throws falls back the same way the row path
does (visible + enabled + fixed label/icon), so one bad predicate can't break the surface.-
Constructor Summary
ConstructorsConstructorDescriptionRecordActionState(boolean visible, boolean enabled, String label, String icon) Creates an instance of aRecordActionStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanenabled()Returns the value of theenabledrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.icon()Returns the value of theiconrecord component.label()Returns the value of thelabelrecord component.final StringtoString()Returns a string representation of this record class.booleanvisible()Returns the value of thevisiblerecord component.
-
Constructor Details
-
RecordActionState
Creates an instance of aRecordActionStaterecord class.- Parameters:
visible- the value for thevisiblerecord componentenabled- the value for theenabledrecord componentlabel- the value for thelabelrecord componenticon- the value for theiconrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
visible
public boolean visible()Returns the value of thevisiblerecord component.- Returns:
- the value of the
visiblerecord component
-
enabled
public boolean enabled()Returns the value of theenabledrecord component.- Returns:
- the value of the
enabledrecord component
-
label
Returns the value of thelabelrecord component.- Returns:
- the value of the
labelrecord component
-
icon
Returns the value of theiconrecord component.- Returns:
- the value of the
iconrecord component
-