|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnars.language.Term
public class Term
Term is the basic component of Narsese, and the object of processing in NARS.
A Term may have an associated Concept containing relations with other Terms. It is not linked in the Term, because a Concept may be forgot, while the Term exists.
Field Summary | |
---|---|
protected java.lang.String |
name
A Term is identified uniquely by its name, a sequence of characters in a given alphabet (ASCII or Unicode) |
Constructor Summary | |
---|---|
protected |
Term()
Default constructor |
|
Term(java.lang.String name)
Constructor with a given name |
Method Summary | |
---|---|
java.lang.Object |
clone()
Make a new Term with the same name. |
int |
compareTo(Term that)
Check the relative order of two Terms. |
boolean |
equals(java.lang.Object that)
Equal terms have identical name, though not necessarily the same reference. |
int |
getComplexity()
The syntactic complexity, for constant automic Term, is 1. |
java.lang.String |
getConstantName()
Default, to be overrided in variable Terms. |
java.lang.String |
getName()
Reporting the name of the current Term. |
TemporalValue |
getOrder()
Get the temporal order in a term, which is null by default |
int |
hashCode()
Produce a hash code for the term |
boolean |
isConstant()
Check whether the current Term can name a Concept. |
java.lang.String |
toString()
The same as getName, used in display. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.lang.String name
Constructor Detail |
---|
protected Term()
public Term(java.lang.String name)
name
- A String as the name of the TermMethod Detail |
---|
public final java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getName()
public java.lang.String getConstantName()
public java.lang.Object clone()
clone
in class java.lang.Object
public boolean equals(java.lang.Object that)
equals
in class java.lang.Object
that
- The Term to be compared with the current Term
public int hashCode()
hashCode
in class java.lang.Object
public int getComplexity()
public final int compareTo(Term that)
based on the constant part first
compareTo
in interface java.lang.Comparable<Term>
that
- The Term to be compared with the current Term
public boolean isConstant()
public TemporalValue getOrder()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |