Record Class LabelEstimator.Pending
java.lang.Object
java.lang.Record
io.github.jbastgen.stemma.app.label.LabelEstimator.Pending
- Enclosing class:
LabelEstimator
public static record LabelEstimator.Pending(CompletableFuture<String> answer, Runnable cancel)
extends Record
A request that is under way: its answer, and a way to stop it.
-
Constructor Summary
ConstructorsConstructorDescriptionPending(CompletableFuture<String> answer, Runnable cancel) Creates an instance of aPendingrecord class. -
Method Summary
Modifier and TypeMethodDescriptionanswer()Returns the value of theanswerrecord component.cancel()Returns the value of thecancelrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static LabelEstimator.PendingWraps a request to the AI.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Pending
Creates an instance of aPendingrecord class.- Parameters:
answer- the value for theanswerrecord componentcancel- the value for thecancelrecord component
-
-
Method Details
-
of
Wraps a request to the AI. -
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). -
answer
Returns the value of theanswerrecord component.- Returns:
- the value of the
answerrecord component
-
cancel
Returns the value of thecancelrecord component.- Returns:
- the value of the
cancelrecord component
-