Record Class ModalSpec.Suggest
java.lang.Object
java.lang.Record
io.github.jbastgen.stemma.app.ui.dialog.ModalSpec.Suggest
- Enclosing class:
ModalSpec
public static record ModalSpec.Suggest(String targetKey, Function<Map<String,String>,CompletableFuture<String>> ask)
extends Record
A button Suggest message under the field
targetKey: ask gets what is typed in the form so far and answers
with the text for the field (or fails with a readable message). It is never submitted by itself.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionask()Returns the value of theaskrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thetargetKeyrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Suggest
Creates an instance of aSuggestrecord class.- Parameters:
targetKey- the value for thetargetKeyrecord componentask- the value for theaskrecord 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). -
targetKey
Returns the value of thetargetKeyrecord component.- Returns:
- the value of the
targetKeyrecord component
-
ask
Returns the value of theaskrecord component.- Returns:
- the value of the
askrecord component
-