public class KnowledgeRecord extends MadaraJNI
Constructor and Description |
---|
KnowledgeRecord()
Default constructor
|
KnowledgeRecord(double dbl)
Constructor for double values
|
KnowledgeRecord(double[] dbls)
Constructor for double[] values
|
KnowledgeRecord(long lng)
Constructor for long/integer values
|
KnowledgeRecord(long[] longs)
Constructor for long[] values
|
KnowledgeRecord(java.lang.String str)
Constructor for string values
|
Modifier and Type | Method and Description |
---|---|
KnowledgeRecord |
clone() |
protected void |
finalize()
Cleans up underlying C resources
|
void |
free()
Deletes the C instantiation.
|
static KnowledgeRecord |
fromPointer(long cptr)
Creates a
KnowledgeRecord from a pointer |
static KnowledgeRecord |
fromPointer(long cptr,
boolean isNew)
Creates a
KnowledgeRecord from a pointer |
KnowledgeType |
getType() |
boolean |
isNew()
Will return true if this object was malloced
|
boolean |
isValid()
Checks if the record is valid or uncreated
|
double |
toDouble()
Converts the value to a float/double
|
double[] |
toDoubleArray()
Converts the value to a double array
|
long |
toLong()
Converts the value to a long
|
long[] |
toLongArray()
Converts the value to a long array
|
java.lang.String |
toString()
Converts the value to a String
|
public KnowledgeRecord()
public KnowledgeRecord(long lng)
lng
- value to setpublic KnowledgeRecord(java.lang.String str)
str
- value to setpublic KnowledgeRecord(double dbl)
dbl
- value to setpublic KnowledgeRecord(double[] dbls)
dbls
- value to setpublic KnowledgeRecord(long[] longs)
longs
- value to setpublic boolean isValid()
public long toLong()
public double toDouble()
public double[] toDoubleArray()
public long[] toLongArray()
public java.lang.String toString()
public KnowledgeType getType()
KnowledgeType
of the valuepublic void free()
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
- necessary for override but unusedpublic static KnowledgeRecord fromPointer(long cptr)
KnowledgeRecord
from a pointercptr
- C pointer to a KnowledgeRecord objectpublic static KnowledgeRecord fromPointer(long cptr, boolean isNew)
KnowledgeRecord
from a pointercptr
- C pointer to a KnowledgeRecord objectisNew
- indicates if the record is meant to be managedpublic boolean isNew()
public KnowledgeRecord clone()
clone
in class java.lang.Object