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