|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnars.language.Term
nars.language.CompoundTerm
nars.language.Statement
public abstract class Statement
A statement is a compound term, consisting of a subject, a predicate, and a relation symbol in between. It can be of either first-order or higher-order.
| Field Summary |
|---|
| Fields inherited from class nars.language.CompoundTerm |
|---|
complexity, components, openVariables |
| Fields inherited from class nars.language.Term |
|---|
name |
| Constructor Summary | |
|---|---|
protected |
Statement()
Default constructor |
protected |
Statement(java.lang.String n,
java.util.ArrayList<Term> arg)
Constructor with partial values, called by make |
protected |
Statement(java.lang.String n,
java.util.ArrayList<Term> cs,
java.util.ArrayList<Variable> open,
short i)
Constructor with full values, called by clone |
| Method Summary | |
|---|---|
Term |
getPredicate()
Return the second component of the statement |
Term |
getSubject()
Return the first component of the statement |
boolean |
invalid()
Check the validity of a potential Statement. |
static boolean |
invalidStatement(Term subject,
Term predicate)
Check the validity of a potential Statement. |
static boolean |
isRelation(java.lang.String s0)
Check Statement relation symbol, called in StringPaser |
static Statement |
make(Statement statement,
Term subj,
Term pred)
Make a Statement from given components, called by the rules |
static Statement |
make(Statement statement,
Term subj,
Term pred,
TemporalValue t)
Make a Statement from given components and temporal information, called by the rules |
static Statement |
make(java.lang.String relation,
Term subject,
Term predicate)
Make a Statement from String, called by StringParser |
protected java.lang.String |
makeName()
Override the default in making the name of the current term from existing fields |
protected static java.lang.String |
makeStatementName(Term subject,
java.lang.String relation,
Term predicate)
Default method to make the name of an image term from given fields |
static Statement |
makeSym(Statement statement,
Term subj,
Term pred,
TemporalValue t)
Make a symmetric Statement from given components and temporal information, called by the rules |
| Methods inherited from class nars.language.CompoundTerm |
|---|
addComponents, argumentsToList, clone, cloneComponents, cloneList, componentAt, containAllComponents, containComponent, getComplexity, getComponents, getConstantName, getOpenVariables, isCommutative, isConstant, isOperator, make, make, makeCompoundName, makeImageName, makeSetName, operator, prepareComponentLinks, reduceComponents, renameVariables, renameVariables, replaceComponent, replaceComponent, size, substituteComponent |
| Methods inherited from class nars.language.Term |
|---|
compareTo, equals, getName, getOrder, hashCode, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected Statement()
protected Statement(java.lang.String n,
java.util.ArrayList<Term> arg)
n - The name of the termarg - The component list of the term
protected Statement(java.lang.String n,
java.util.ArrayList<Term> cs,
java.util.ArrayList<Variable> open,
short i)
n - The name of the termcs - Component listopen - Open variable listi - Syntactic complexity of the compound| Method Detail |
|---|
public static Statement make(java.lang.String relation,
Term subject,
Term predicate)
relation - The relation Stringsubject - The first componentpredicate - The second component
public static Statement make(Statement statement,
Term subj,
Term pred)
subj - The first componentpred - The second componentstatement - A sample statement providing the class type
public static Statement make(Statement statement,
Term subj,
Term pred,
TemporalValue t)
statement - A sample statement providing the class typesubj - The first componentpred - The second componentt - The temporal order of the statement
public static Statement makeSym(Statement statement,
Term subj,
Term pred,
TemporalValue t)
statement - A sample asymmetric statement providing the class typesubj - The first componentpred - The second componentt - The temporal order of the statement
public static boolean isRelation(java.lang.String s0)
s0 - The String to be checked
protected java.lang.String makeName()
makeName in class CompoundTerm
protected static java.lang.String makeStatementName(Term subject,
java.lang.String relation,
Term predicate)
subject - The first componentpredicate - The second componentrelation - The relation operator
public static boolean invalidStatement(Term subject,
Term predicate)
Minimum requirement: the two terms cannot be the same, or containing each other as component
subject - The first componentpredicate - The second component
public boolean invalid()
Minimum requirement: the two terms cannot be the same, or containing each other as component
public Term getSubject()
public Term getPredicate()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||