Serializable
, Cloneable
, Comparable<AbstractTerm>
, Iterable<Term>
, AbstractTerm
Equivalence
, Implication
, Inheritance
, Similarity
public abstract class Statement extends CompoundTerm
Modifier and Type | Class | Description |
---|---|---|
static class |
Statement.EnumStatementSide |
CompoundTerm.ConvRectangle, CompoundTerm.UnableToCloneException
Term.TermVisitor
complexity, conceptival, containedTemporalRelations, hash, term
EmptyTermArray, imagination, index_variable, SELF, SEQ_SPATIAL, SEQ_TEMPORAL, term_indices
Modifier | Constructor | Description |
---|---|---|
protected |
Statement(Term[] arg) |
Constructor with partial values, called by make
Subclass constructors should call init after any initialization
|
Modifier and Type | Method | Description |
---|---|---|
abstract Statement |
clone() |
clone method
|
Term |
getPredicate() |
Return the second component of the statement
|
Term |
getSubject() |
Return the first component of the statement
|
protected void |
init(Term[] t) |
call this after changing Term[] contents
|
boolean |
invalid() |
Check the validity of a potential Statement.
|
static boolean |
invalidPair(Term s1,
Term s2) |
|
private static boolean |
invalidReflexive(Term t1,
Term t2) |
Check if one term is identical to or included in another one, except in a
reflexive relation
|
static boolean |
invalidStatement(Term subject,
Term predicate) |
|
static boolean |
invalidStatement(Term subject,
Term predicate,
boolean checkSameTermInPredicateAndSubject) |
Check the validity of a potential Statement.
|
static Statement |
make(Symbols.NativeOperator o,
Term subject,
Term predicate,
boolean customOrder,
int order) |
Make a Statement from String, called by StringParser
|
static Statement |
make(Symbols.NativeOperator op,
Term subj,
Term pred,
int order) |
Make a Statement from given term, called by the rules
|
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,
int order) |
|
protected CharSequence |
makeName() |
Override the default in making the nameStr of the current term from
existing fields
|
protected static CharSequence |
makeStatementName(Term subject,
Symbols.NativeOperator relation,
Term predicate) |
|
static Statement |
makeSym(Statement statement,
Term subj,
Term pred,
int order) |
Make a symmetric Statement from given term and temporal
information, called by the rules
|
Term |
retBySide(Statement.EnumStatementSide side) |
returns the subject (0) or predicate(1)
|
static Statement.EnumStatementSide |
retOppositeSide(Statement.EnumStatementSide side) |
addComponentsRecursively, addTermsTo, applySubstitute, applySubstituteToCompound, asTermList, clone, cloneDeep, cloneDeepVariables, cloneTerms, cloneTermsAppend, cloneTermsDeep, cloneTermsExcept, cloneTermsListDeep, cloneTermsReplacing, cloneVariableTermsDeep, compareTo, containedTemporalRelations, containsAllTermsOf, containsTerm, containsTermRecursively, countTermRecursively, equals, extractIntervals, getComplexity, getContainedTerms, hashCode, hasInterval, hasVar, hasVarDep, hasVarIndep, hasVarQuery, invalidateName, isCommutative, isNormalized, iterator, makeCompoundName, name, operator, prepareComponentLinks, replaceIntervals, setComponent, setNormalized, shuffle, size, termArray, termList, transformIndependentVariableToDependent, UpdateConvRectangle
forEach, spliterator
finalize, getClass, notify, notifyAll, wait, wait, wait
get, get, getIsSpatial, getTemporalOrder, hasVar, isConstant, isExecutable, isHigherOrderStatement, isSelf, nameInternal, recurseSubtermsContainingVariables, recurseSubtermsContainingVariables, recurseTerms, setName, subjectOrPredicateIsIndependentVar, text, toSortedSet, toSortedSetArray, toString, valid
protected Statement(Term[] arg)
arg
- The component list of the termprotected void init(Term[] t)
CompoundTerm
init
in class CompoundTerm
public static Statement make(Statement statement, Term subj, Term pred)
subj
- The first componentpred
- The second componentstatement
- A sample statement providing the class typepublic static final Statement make(Symbols.NativeOperator o, Term subject, Term predicate, boolean customOrder, int order)
o
- The relation Stringsubject
- The first componentpredicate
- The second componentpublic static final Statement make(Symbols.NativeOperator op, Term subj, Term pred, int order)
order
- The temporal order of the statementsubj
- The first componentpred
- The second componentpublic static final Statement makeSym(Statement statement, Term subj, Term pred, int order)
statement
- A sample asymmetric statement providing the class typesubj
- The first componentpred
- The second componentorder
- The temporal orderprotected CharSequence makeName()
makeName
in class CompoundTerm
protected static final CharSequence makeStatementName(Term subject, Symbols.NativeOperator relation, Term predicate)
public static final boolean invalidStatement(Term subject, Term predicate, boolean checkSameTermInPredicateAndSubject)
subject
- The first componentpredicate
- The second componentprivate static boolean invalidReflexive(Term t1, Term t2)
t1
- The first termt2
- The second termpublic boolean invalid()
Minimum requirement: the two terms cannot be the same, or containing each other as component
public Term getSubject()
public Term getPredicate()
public Term retBySide(Statement.EnumStatementSide side)
side
- subject(0) or predicate(1)public static Statement.EnumStatementSide retOppositeSide(Statement.EnumStatementSide side)
public abstract Statement clone()
CompoundTerm
clone
in class CompoundTerm
Copyright © 2020 OpenNARS. All rights reserved.