public class Integer extends BaseContainer
Constructor and Description |
---|
Integer()
Default constructor
|
Integer(Integer input)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
long |
dec()
Decrements the container
|
long |
dec(long value)
Decrements by a value
|
protected void |
finalize()
Cleans up underlying C resources
|
void |
free()
Deletes the C instantiation.
|
static Integer |
fromPointer(long cptr)
Creates a java object instance from a C/C++ pointer
|
static Integer |
fromPointer(long cptr,
boolean shouldManage)
Creates a java object instance from a C/C++ pointer
|
long |
get()
Gets the value
|
java.lang.String |
getName()
Gets the name of the variable
|
long |
inc()
Increments the container
|
long |
inc(long value)
Increments by a value
|
boolean |
isFalse()
Returns true if the container evaluates to false
|
boolean |
isTrue()
Returns true if the container evaluates to true
|
void |
modify()
Mark the value as modified.
|
void |
set(long 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
|
double |
toDouble()
Converts the value to a double
|
long |
toLong()
Converts the value to a long
|
java.lang.String |
toString()
Converts the value to a string
|
modifyIfFalse, modifyIfTrue
public Integer()
public Integer(Integer input)
input
- instance to copypublic static Integer fromPointer(long cptr)
cptr
- C pointer to the objectpublic static Integer fromPointer(long cptr, boolean shouldManage)
cptr
- C pointer to the objectshouldManage
- if true, manage the pointerpublic long get()
public java.lang.String getName()
public long inc()
public long inc(long value)
value
- value to increment bypublic long dec()
public long dec(long value)
value
- value to increment bypublic void set(long value)
value
- new valuepublic 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 double toDouble()
public long toLong()
public java.lang.String toString()
public void free()
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
- necessary for override but unused