public class NativeIntegerVector extends BaseContainer
Constructor and Description |
---|
NativeIntegerVector() |
NativeIntegerVector(NativeIntegerVector input) |
Modifier and Type | Method and Description |
---|---|
protected void |
finalize()
Cleans up underlying C resources
|
void |
free()
Deletes the C instantiation.
|
static NativeIntegerVector |
fromPointer(long cptr)
Creates a java object instance from a C/C++ pointer
|
static NativeIntegerVector |
fromPointer(long cptr,
boolean shouldManage)
Creates a java object instance from a C/C++ pointer
|
long |
get(int index)
Gets the value at the 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 |
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 the specified 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, modifyIfTrue
public NativeIntegerVector()
public NativeIntegerVector(NativeIntegerVector input)
public static NativeIntegerVector fromPointer(long cptr)
cptr
- C pointer to the objectpublic static NativeIntegerVector fromPointer(long cptr, boolean shouldManage)
cptr
- C pointer to the objectshouldManage
- if true, manage the pointerpublic long get(int index)
index
- the index 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 of the element in the array to changevalue
- new valuepublic void pushback(long value)
value
- new value to add to vectorpublic void modify()
public boolean isTrue()
public boolean isFalse()
public 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.Object
java.lang.Throwable
- necessary for override but unused