public class FlexMap extends BaseContainer
Constructor and Description |
---|
FlexMap()
Default constructor
|
FlexMap(FlexMap input)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
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 FlexMap |
fromPointer(long cptr)
Creates a java object instance from a C/C++ pointer
|
static FlexMap |
fromPointer(long cptr,
boolean shouldManage)
Creates a java object instance from a C/C++ pointer
|
FlexMap |
get(int index)
Creates a FlexMap at the indexed location
|
FlexMap |
get(java.lang.String key)
Creates a FlexMap at the keyed location
|
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 all keys in the map
|
java.lang.String[] |
keys(boolean firstLevel)
Gets keys in the map, with option to get only first level keys
|
void |
modify()
Mark the map as modified.
|
void |
set(double value)
Sets the location to a double
|
void |
set(long value)
Sets the location to an integer value
|
void |
set(java.lang.String value)
Sets the location to a string
|
void |
set(java.lang.String key,
KnowledgeRecord value)
Sets the location to a KnowledgeRecord 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
|
Map |
toMapContainer()
Creates a Map container from the current location.
|
KnowledgeRecord |
toRecord()
Returns a value at the specified key
|
modifyIfFalse, modifyIfTrue
public FlexMap()
public FlexMap(FlexMap input)
input
- instance to copypublic static FlexMap fromPointer(long cptr)
cptr
- C pointer to the objectpublic static FlexMap fromPointer(long cptr, boolean shouldManage)
cptr
- C pointer to the objectshouldManage
- if true, manage the pointerpublic java.lang.String[] keys()
public java.lang.String[] keys(boolean firstLevel)
firstLevel
- if true, only return the immediate subkeys and not
full key namespublic FlexMap get(java.lang.String key)
key
- the next level of the FlexMappublic FlexMap get(int index)
index
- an index into the FlexMappublic java.lang.String getName()
public java.lang.String getDelimiter()
public void setDelimiter(java.lang.String delimiter)
delimiter
- the separator between the map and elementspublic void modify()
public boolean isTrue()
public boolean isFalse()
public void clear()
public void erase(java.lang.String key)
key
- the element keypublic void set(java.lang.String value)
value
- new valuepublic void set(double value)
value
- new valuepublic void set(long value)
value
- new valuepublic void set(java.lang.String key, KnowledgeRecord value)
key
- the location within the virtual 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()
public Map toMapContainer()
public void free()
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
- necessary for override but unused