Jalog 1.4
java.lang.Object io.github.JalogTeam.jalog.Pro_TermData
public abstract class Pro_TermData
All data and programs are represented as Pro_Term
objects. Every
Pro_Term
object has a pointer to a Pro_TermData
object
that contains the associated data.
For each data type there is a subclass of this class. In addition there is the subclass Pro_TermData_Unified
to indicate that the data is the same as in another term.
Field Summary | |
---|---|
String |
typename
Type of the term |
Method Summary | |
---|---|
Pro_TermData
|
copy(Hashtable variable_map)
Returns an independent copy this of term using variable_map .
|
String
|
image()
Returns human readable string representation of this term. |
abstract String
|
toString()
Returns Jalog syntax representation of this term. |
Field Detail |
---|
public String typename
Jalog
. This is set in the subclass constructor. Do not change!
Method Detail |
---|
public static Pro_Term copy(Hashtable variable_map)
variable_map
. Hashtable is used to map repeated open terms to repeated open terms. Hashtable is updated for new open terms. Used in database asserting and fetching.
This must be overridden in subclass if the data value may contain subterms. In the overridden method the possible subterms must be copied using the parameter variable_map
, e.g.
if (t1 != null) { new_t1 = t1.copy(variable_map); }The
copy
method of Pro_Term
may return the original object. If this happens for all subterms the original Pro_TermData
object this
should be returned. Otherwise a new Pro_TermData
object must be created and returned.
variable_map
- contains open variable mapping for this term.
variable_map
.
public String image()
toString
is used.
Used by built-in predicate write
.
public abstract String toString()