Package page.codeberg.friedolyn.gui
Record Class GUI.DialogResult<ResultType>
java.lang.Object
java.lang.Record
page.codeberg.friedolyn.gui.GUI.DialogResult<ResultType>
- Type Parameters:
ResultType- The type of the result that the user has entered.- Record Components:
success- Whether the user has successfully entered valid information and closed the window.result- The actual value(s) that the user has entered. If the user has not entered any information or closed the window without entering anything, this will be an emptyOptional.
- Enclosing class:
GUI
public static record GUI.DialogResult<ResultType>(@NonNull FuzzyBoolean success, @NonNull Optional<ResultType> result)
extends Record
A record that represents the user's input in a dialog window.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @NonNull Optional<ResultType> The field for theresultrecord component.private final @NonNull FuzzyBooleanThe field for thesuccessrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionDialogResult(@NonNull FuzzyBoolean success, @NonNull Optional<ResultType> result) Creates an instance of aDialogResultrecord 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.@NonNull Optional<ResultType> result()Returns the value of theresultrecord component.@NonNull FuzzyBooleansuccess()Returns the value of thesuccessrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
Constructor Details
-
DialogResult
public DialogResult(@NonNull @NonNull FuzzyBoolean success, @NonNull @NonNull Optional<ResultType> result) Creates an instance of aDialogResultrecord class.
-
-
Method Details
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
success
-
result
-