public class Vector extends BaseContainer
| Constructor and Description |
|---|
Vector()
Default constructor
|
Vector(Vector input)
Copy constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
finalize()
Cleans up underlying C resources
|
void |
free()
Deletes the C instantiation.
|
static Vector |
fromPointer(long cptr)
Creates a java object instance from a C/C++ pointer
|
static Vector |
fromPointer(long cptr,
boolean shouldManage)
Creates a java object instance from a C/C++ pointer
|
KnowledgeRecord |
get(int index)
Gets the value
|
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
|
void |
modify()
Mark the vector as modified.
|
void |
modify(int index)
Mark an element as modified.
|
void |
pushback(double value)
Pushes a value to the end of the vector
|
void |
pushback(double[] value)
Pushes a value to the end of the vector
|
void |
pushback(KnowledgeRecord value)
Pushes a value to the end of the vector
|
void |
pushback(long value)
Pushes a value to the end of the vector
|
void |
pushback(long[] value)
Pushes a value to the end of the vector
|
void |
pushback(java.lang.String value)
Pushes a value to the end of the vector
|
void |
resize(long length)
Resizes the vector.
|
void |
set(int index,
double value)
Sets the value
|
void |
set(int index,
KnowledgeRecord value)
Sets the value
|
void |
set(int index,
long value)
Sets the value
|
void |
set(int index,
java.lang.String value)
Sets the value
|
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
|
long |
size()
Returns the size of the vector
|
KnowledgeRecord[] |
toArray()
Returns a value at the specified index
|
KnowledgeRecord |
toRecord(int index)
Returns a value at the specified index
|
modifyIfFalse, modifyIfTruepublic Vector()
public Vector(Vector input)
input - instance to copypublic static Vector fromPointer(long cptr)
cptr - C pointer to the objectpublic static Vector fromPointer(long cptr, boolean shouldManage)
cptr - C pointer to the objectshouldManage - if true, manage the pointerpublic KnowledgeRecord get(int index)
index - index for the new valuepublic java.lang.String getName()
public void resize(long length)
length - new number of elements of the vectorpublic void set(int index,
java.lang.String value)
index - index for the new valuevalue - new valuepublic void set(int index,
double value)
index - index for the new valuevalue - new valuepublic void set(int index,
long value)
index - index for the new valuevalue - new valuepublic void set(int index,
KnowledgeRecord value)
index - index for the new valuevalue - new valuepublic void pushback(KnowledgeRecord value)
value - new value to add to vectorpublic void pushback(java.lang.String value)
value - new value to add to vectorpublic void pushback(long value)
value - new value to add to vectorpublic void pushback(long[] value)
value - new value to add to vectorpublic void pushback(double value)
value - new value to add to vectorpublic void pushback(double[] value)
value - new value to add to vectorpublic void modify()
public boolean isTrue()
public boolean isFalse()
public void modify(int index)
index - the element indexpublic 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 long size()
public KnowledgeRecord toRecord(int index)
index - the indexpublic KnowledgeRecord[] toArray()
public void free()
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable - necessary for override but unused