Record Class DialogInput.SingleOption.Entry
java.lang.Object
java.lang.Record
fr.fidorial.dialog.DialogInput.SingleOption.Entry
- Record Components:
id- the value sent when this entry is pickeddisplay- how the entry reads on screen, ornullto displayidinitial- whether the control starts on this entry
- Enclosing class:
DialogInput.SingleOption
public static record DialogInput.SingleOption.Entry(String id, @Nullable Component display, boolean initial)
extends Record
One entry of a
DialogInput.SingleOption control.- Since:
- 0.1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a copy of this entry the control starts on.display()Returns the value of thedisplayrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.booleaninitial()Returns the value of theinitialrecord component.Creates an entry displaying its own identifier.of(String id, ComponentLike display) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Entry
-
-
Method Details
-
of
Creates an entry displaying its own identifier.- Parameters:
id- the value sent when this entry is picked- Returns:
- the entry
- Since:
- 0.1.0
-
of
@Contract("_, _ -> new") public static DialogInput.SingleOption.Entry of(String id, ComponentLike display) - Parameters:
id- the value sent when this entry is pickeddisplay- how the entry reads on screen- Returns:
- the entry
- Since:
- 0.1.0
-
asInitial
Returns a copy of this entry the control starts on.- Returns:
- a copy of this entry the control starts on
- Since:
- 0.1.0
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
id
-
display
-
initial
-