Package akka.javasdk.decision
Record Class Answer.Predicate
- Record Components:
probability- the probability that the condition is true, from 0 to 1
- All Implemented Interfaces:
Answer
- Enclosing interface:
Answer
The answer to a
Question.Predicate. Compare the probability with a threshold that fits
the cost of a wrong answer in your use case.-
Nested Class Summary
Nested classes/interfaces inherited from interface akka.javasdk.decision.Answer
Answer.Choice, Answer.Predicate, Answer.Score -
Constructor Summary
ConstructorsConstructorDescriptionPredicate(double probability) Creates an instance of aPredicaterecord 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.doubleReturns the value of theprobabilityrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Predicate
public Predicate(double probability) Creates an instance of aPredicaterecord class.- Parameters:
probability- the value for theprobabilityrecord 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 with '=='. -
probability
public double probability()Returns the value of theprobabilityrecord component.- Returns:
- the value of the
probabilityrecord component
-