Jalog 1.4
java.lang.Objectio.github.JalogTeam.jalog.Pro_TermData
io.github.JalogTeam.jalog.Pro_TermData_Compound
public class Pro_TermData_Compound
Rules, mathematical operations, compound objects and symbols are represented as
Pro_TermData_Compound objects.
| Field Summary | |
|---|---|
byte |
arity
Number of subterms. 0 for symbols |
String |
name
Functor |
Pro_Term[] |
subterm
Array of subterms |
String |
typename
Type of the term |
| Constructor Summary | |
|---|---|
Pro_TermData_Compound(String iniName)
Constructs a Pro_TermData_Compound object without subterms (a symbol). |
|
Pro_TermData_Compound(String iniName,
Pro_Term[] iniSubterm)
Constructs a Pro_TermData_Compound object. |
|
Pro_TermData_Compound(String iniName,
Pro_Term sub)
Constructs a Pro_TermData_Compound object. |
|
Pro_TermData_Compound(String iniName,
Pro_Term left, Pro_Term right)
Constructs a Pro_TermData_Compound object. |
|
| 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. |
String
|
toString()
Returns Jalog syntax representation of this term. |
| Field Detail |
|---|
public byte arity
subterm array.
public String name
public String subterm
arity
public String typename
Jalog:
Jalog.SYMBOL if there are no subterms or Jalog.COMPOUND otherwise. This is set in the subclass constructor. Do not change!
| Constructor Detail |
|---|
public Pro_TermData_Compound(String iniName)
Pro_TermData_Compound object representing the symbol iniName.
iniName - the functor.
public Pro_TermData_Compound(String iniName, Pro_Term[] iniSubterm)
Pro_TermData_Compound object with subterms from iniSubterm array. If iniSubterm is null or an empty array then a SYMBOL with iniName is constructed.
iniName - the functor.
iniSubterm - array of subterms or null.
public Pro_TermData_Compound(String iniName, Pro_Term sub)
Pro_TermData_Compound object with subterm sub.
iniName - the functor.
sub - the subterm. Must not be null.
public Pro_TermData_Compound(String iniName, Pro_Term left, Pro_Term right)
Pro_TermData_Compound object with subterms left and right.
iniName - the functor.
left - the first subterm. Must not be null.
right - the the second subterm. Must not be null.
| Method Detail |
|---|
public Pro_TermData 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 method copies all subterms using the Pro_Term.
The copy method of Pro_Term may return the original object. If this happens for all subterms the original Pro_TermData_Compound object then this is returned. Otherwise a new Pro_TermData_Compound object is created and returned.
variable_map - contains open variable mapping for this term.
variable_map.
public String image()
write.
public String toString()