Package com.tnsai.intelligence.knowledge
Record Class ContradictionDetector.Contradiction
java.lang.Object
java.lang.Record
com.tnsai.intelligence.knowledge.ContradictionDetector.Contradiction
- Record Components:
existing- the already-stored factincoming- the new fact that contradicts itexplanation- human-readable description of the contradictionconfidence- confidence that this is a real contradiction (min of both facts' confidence)
- Enclosing class:
ContradictionDetector
public static record ContradictionDetector.Contradiction(TemporalKnowledge existing, TemporalKnowledge incoming, String explanation, double confidence)
extends Record
A detected contradiction between two temporal knowledge items.
-
Constructor Summary
ConstructorsConstructorDescriptionContradiction(TemporalKnowledge existing, TemporalKnowledge incoming, String explanation, double confidence) Compact constructor with validation. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of theconfidencerecord component.final booleanIndicates whether some other object is "equal to" this one.existing()Returns the value of theexistingrecord component.Returns the value of theexplanationrecord component.final inthashCode()Returns a hash code value for this object.incoming()Returns the value of theincomingrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Contradiction
public Contradiction(TemporalKnowledge existing, TemporalKnowledge incoming, String explanation, double confidence) Compact constructor with validation.
-
-
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 '=='. -
existing
Returns the value of theexistingrecord component.- Returns:
- the value of the
existingrecord component
-
incoming
Returns the value of theincomingrecord component.- Returns:
- the value of the
incomingrecord component
-
explanation
Returns the value of theexplanationrecord component.- Returns:
- the value of the
explanationrecord component
-
confidence
public double confidence()Returns the value of theconfidencerecord component.- Returns:
- the value of the
confidencerecord component
-