Package com.tnsai.reasoning.causal
Record Class CausalResult
java.lang.Object
java.lang.Record
com.tnsai.reasoning.causal.CausalResult
public record CausalResult(CausalQueryType queryType, String answer, String reasoning, double confidence)
extends Record
Result of a causal reasoning query.
-
Constructor Summary
ConstructorsConstructorDescriptionCausalResult(CausalQueryType queryType, String answer, String reasoning, double confidence) Creates an instance of aCausalResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionanswer()Returns the value of theanswerrecord component.doubleReturns the value of theconfidencerecord 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 thequeryTyperecord component.Returns the value of thereasoningrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CausalResult
Creates an instance of aCausalResultrecord class.- Parameters:
queryType- the value for thequeryTyperecord componentanswer- the value for theanswerrecord componentreasoning- the value for thereasoningrecord componentconfidence- the value for theconfidencerecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
queryType
Returns the value of thequeryTyperecord component.- Returns:
- the value of the
queryTyperecord component
-
answer
Returns the value of theanswerrecord component.- Returns:
- the value of the
answerrecord component
-
reasoning
Returns the value of thereasoningrecord component.- Returns:
- the value of the
reasoningrecord component
-
confidence
public double confidence()Returns the value of theconfidencerecord component.- Returns:
- the value of the
confidencerecord component
-