io.sarl.api.workingmemory
Skill DictionaryWorkingMemory
All Superinterfaces:
WorkingMemory, Capacity, IBehaviorGuardEvaluatorReceiver
@org.eclipse.xtext.xbase.lib.XbaseGenerated
skill DictionaryWorkingMemory
extends AbstractWorkingMemory
implements Capacity
Standard skill to access to the agent working memory. In this skill, the knowledges are stored in a data structure that is based on a TreeMap.

This class is thread-safe.
Maven Group Identifier:
io.sarl.sdk
Maven Artifact Identifier:
api.workingmemory
Since:
0.15
Property Summary
Modifier and type Property and description
java.util.stream.Stream<T> definedNames
long memorySize
Constructor Summary
Constructor and description
new([Map<K,V>],[Comparator<T>],[boolean])
Constructor.
Action Summary
Property Details
definedNames
val definedNames : java.util.stream.Stream<T>

This property is an alias for the action: getDefinedNames

memorySize
val memorySize : long

This property is an alias for the action: getMemorySize

Constructor Details
new([Map<K,V>],[Comparator<T>],[boolean])
new([Map<K,V>],[Comparator<T>],[boolean])
Constructor.
Parameters:
initialBase - the initial content of the working memory. If this argument is not provided, the memory is empty.
comparator - the comparator for ensuring unique knowledge identifiers in the memory. If this argument is not provided, the natural order of ScopedDataName is used.
enableNullValues - indicates if the null values are allowed to be assocated to knowledge in the working memory. Default value is false.
Action Details
clearMemory
def clearMemory
getDefinedForName(String)
def getDefinedForName(String) : java.util.stream.Stream<T>
getDefinedNames
def getDefinedNames : java.util.stream.Stream<T>
getKnowledge(ScopedDataName,Class<T>)
def getKnowledge(ScopedDataName,Class<T>) : T

with T

getMemorySize
def getMemorySize : long
isDefined(ScopedDataName)
def isDefined(ScopedDataName) : boolean
isMemoryEmpty
def isMemoryEmpty : boolean
isNullAllowedInMemory
def isNullAllowedInMemory : boolean
removeKnowledge(ScopedDataName)
def removeKnowledge(ScopedDataName) : java.lang.Object
removeNullValuedKnowledges
def removeNullValuedKnowledges
setKnowledge(ScopedDataName,Object)
def setKnowledge(ScopedDataName,Object) : java.lang.Object
setKnowledgeIfAbsent(ScopedDataName,Object)
def setKnowledgeIfAbsent(ScopedDataName,Object)
setKnowledgeIfPresent(ScopedDataName,Object)
def setKnowledgeIfPresent(ScopedDataName,Object) : java.lang.Object
setNullAllowedInMemory(boolean)
def setNullAllowedInMemory(boolean)