Package akka.javasdk.decision
Record Class Question.Predicate
- Record Components:
whenTrue- what counts as true, if givenwhenFalse- what counts as false, if given
- All Implemented Interfaces:
Question<Answer.Predicate>
public static record Question.Predicate(String key, String instructions, Optional<String> whenTrue, Optional<String> whenFalse)
extends Record
implements Question<Answer.Predicate>
A condition about the input. Answered with an
Answer.Predicate.-
Nested Class Summary
Nested classes/interfaces inherited from interface akka.javasdk.decision.Question
Question.Choice, Question.Predicate, Question.Score -
Constructor Summary
Constructors -
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.Returns the value of theinstructionsrecord component.key()Returns the value of thekeyrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thewhenFalserecord component.whenTrue()Returns the value of thewhenTruerecord component.
-
Constructor Details
-
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). -
key
Returns the value of thekeyrecord component.- Specified by:
keyin interfaceQuestion<Answer.Predicate>- Returns:
- the value of the
keyrecord component
-
instructions
Returns the value of theinstructionsrecord component.- Specified by:
instructionsin interfaceQuestion<Answer.Predicate>- Returns:
- the value of the
instructionsrecord component
-
whenTrue
Returns the value of thewhenTruerecord component.- Returns:
- the value of the
whenTruerecord component
-
whenFalse
Returns the value of thewhenFalserecord component.- Returns:
- the value of the
whenFalserecord component
-