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 theresult
record component.private final @NonNull FuzzyBoolean
The field for thesuccess
record component. -
Constructor Summary
ConstructorsConstructorDescriptionDialogResult
(@NonNull FuzzyBoolean success, @NonNull Optional<ResultType> result) Creates an instance of aDialogResult
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@NonNull Optional
<ResultType> result()
Returns the value of theresult
record component.@NonNull FuzzyBoolean
success()
Returns the value of thesuccess
record component.final String
toString()
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 aDialogResult
record 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
-