Package com.tnsai.spi
Record Class CognitiveModel.CognitiveState
java.lang.Object
java.lang.Record
com.tnsai.spi.CognitiveModel.CognitiveState
- Enclosing interface:
CognitiveModel
public static record CognitiveModel.CognitiveState(List<CognitiveModel.Belief> beliefs, List<CognitiveModel.Goal> goals, List<CognitiveModel.Intention> intentions, Map<String,Object> metadata)
extends Record
Snapshot of cognitive state for persistence.
-
Constructor Summary
ConstructorsConstructorDescriptionCognitiveState(List<CognitiveModel.Belief> beliefs, List<CognitiveModel.Goal> goals, List<CognitiveModel.Intention> intentions, Map<String, Object> metadata) Creates an instance of aCognitiveStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionbeliefs()Returns the value of thebeliefsrecord component.final booleanIndicates whether some other object is "equal to" this one.goals()Returns the value of thegoalsrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theintentionsrecord component.metadata()Returns the value of themetadatarecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CognitiveState
public CognitiveState(List<CognitiveModel.Belief> beliefs, List<CognitiveModel.Goal> goals, List<CognitiveModel.Intention> intentions, Map<String, Object> metadata) Creates an instance of aCognitiveStaterecord class.- Parameters:
beliefs- the value for thebeliefsrecord componentgoals- the value for thegoalsrecord componentintentions- the value for theintentionsrecord componentmetadata- the value for themetadatarecord 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 withObjects::equals(Object,Object). -
beliefs
Returns the value of thebeliefsrecord component.- Returns:
- the value of the
beliefsrecord component
-
goals
Returns the value of thegoalsrecord component.- Returns:
- the value of the
goalsrecord component
-
intentions
Returns the value of theintentionsrecord component.- Returns:
- the value of the
intentionsrecord component
-
metadata
Returns the value of themetadatarecord component.- Returns:
- the value of the
metadatarecord component
-