Package com.tnsai.spi
Record Class CognitiveModel.Belief
java.lang.Object
java.lang.Record
com.tnsai.spi.CognitiveModel.Belief
- Enclosing interface:
CognitiveModel
public static record CognitiveModel.Belief(String content, double confidence, long timestamp, Map<String,Object> metadata)
extends Record
Represents a belief in the cognitive model.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of theconfidencerecord component.content()Returns the value of thecontentrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.metadata()Returns the value of themetadatarecord component.static CognitiveModel.Beliefstatic CognitiveModel.BelieflongReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Belief
Creates an instance of aBeliefrecord class.- Parameters:
content- the value for thecontentrecord componentconfidence- the value for theconfidencerecord componenttimestamp- the value for thetimestamprecord componentmetadata- the value for themetadatarecord component
-
-
Method Details
-
of
-
of
-
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 '=='. -
content
Returns the value of thecontentrecord component.- Returns:
- the value of the
contentrecord component
-
confidence
public double confidence()Returns the value of theconfidencerecord component.- Returns:
- the value of the
confidencerecord component
-
timestamp
public long timestamp()Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-
metadata
Returns the value of themetadatarecord component.- Returns:
- the value of the
metadatarecord component
-