public class Map extends BaseContainer
| Constructor and Description |
|---|
Map()
Default constructor
|
Map(Map input)
Copy constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear(boolean clear_variables)
Clears the variables in the map
|
void |
erase(java.lang.String key)
Erases a variable located at key in the map.
|
protected void |
finalize()
Cleans up underlying C resources
|
void |
free()
Deletes the C instantiation.
|
static Map |
fromPointer(long cptr)
Creates a java object instance from a C/C++ pointer
|
static Map |
fromPointer(long cptr,
boolean shouldManage)
Creates a java object instance from a C/C++ pointer
|
KnowledgeRecord |
get(java.lang.String key)
Gets the value
|
java.lang.String |
getDelimiter()
Gets the delimiter that separates the name of the map with its elements
|
java.lang.String |
getName()
Gets the name of the variable
|
boolean |
isFalse()
Returns true if the container evaluates to false
|
boolean |
isTrue()
Returns true if the container evaluates to true
|
java.lang.String[] |
keys()
Gets the current keys in the map
|
void |
modify()
Mark the map as modified.
|
void |
modify(java.lang.String key)
Mark an element as modified.
|
void |
set(java.lang.String key,
double value)
Sets the value
|
void |
set(java.lang.String key,
KnowledgeRecord value)
Sets the value
|
void |
set(java.lang.String key,
long value)
Sets the value
|
void |
set(java.lang.String key,
java.lang.String value)
Sets the value
|
void |
setDelimiter(java.lang.String delimiter)
Sets the delimiter that separates the name of the map with its elements
|
void |
setName(KnowledgeBase kb,
java.lang.String name)
Sets the name and knowledge base being referred to
|
void |
setName(Variables vars,
java.lang.String name)
Sets the name and knowledge base being referred to
|
void |
setSettings(UpdateSettings settings)
Sets the settings for updating variables in the Knowledge Base
|
void |
sync()
Syncs the map to the underlying knowledge base.
|
KnowledgeRecord |
toRecord(java.lang.String key)
Returns a value at the specified key
|
modifyIfFalse, modifyIfTruepublic Map()
public Map(Map input)
input - instance to copypublic static Map fromPointer(long cptr)
cptr - C pointer to the objectpublic static Map fromPointer(long cptr, boolean shouldManage)
cptr - C pointer to the objectshouldManage - if true, manage the pointerpublic KnowledgeRecord get(java.lang.String key)
key - the location in the mappublic java.lang.String getName()
public java.lang.String getDelimiter()
public void setDelimiter(java.lang.String delimiter)
delimiter - the separator between the map and elementspublic java.lang.String[] keys()
public void sync()
public void modify()
public boolean isTrue()
public boolean isFalse()
public void modify(java.lang.String key)
key - the element keypublic void clear(boolean clear_variables)
clear_variables - if true, clear the variables from the knowledge
base as well as the mappublic void erase(java.lang.String key)
key - the element keypublic void set(java.lang.String key,
java.lang.String value)
key - the location in the mapvalue - new valuepublic void set(java.lang.String key,
double value)
key - the location in the mapvalue - new valuepublic void set(java.lang.String key,
long value)
key - the location in the mapvalue - new valuepublic void set(java.lang.String key,
KnowledgeRecord value)
key - the location in the mapvalue - new valuepublic void setName(KnowledgeBase kb, java.lang.String name)
kb - the knowledge base that contains the namename - the variable namepublic void setName(Variables vars, java.lang.String name)
vars - the variables facade that contains the namename - the variable namepublic void setSettings(UpdateSettings settings)
settings - the settings to use for updating the Knowledge Basepublic KnowledgeRecord toRecord(java.lang.String key)
key - the location in the mappublic void free()
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable - necessary for override but unused