nars.language
Class Equivalence

java.lang.Object
  extended by nars.language.Term
      extended by nars.language.CompoundTerm
          extended by nars.language.Statement
              extended by nars.language.Equivalence
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable<Term>

public class Equivalence
extends Statement

A Statement about an Equivalence relation.


Field Summary
private  TemporalValue temporalOrder
          Temporal order between the components
 
Fields inherited from class nars.language.CompoundTerm
complexity, components, openVariables
 
Fields inherited from class nars.language.Term
name
 
Constructor Summary
protected Equivalence(java.lang.String n, java.util.ArrayList<Term> cs, java.util.ArrayList<Variable> open, short i, TemporalValue order)
          Constructor with full values, called by clone
protected Equivalence(java.lang.String n, java.util.ArrayList<Term> arg, TemporalValue order)
          Constructor with partial values, called by make
 
Method Summary
 java.lang.Object clone()
          Clone an object
static java.lang.String getEquivalenceSymbol(TemporalValue t)
          Get the symbole of the relation by tense
 TemporalValue getOrder()
          Get the temporal order.
 boolean isCommutative()
          Check if the compound is communitative.
static Equivalence make(Term subject, Term predicate, TemporalValue order)
          Try to make a new compound from two components.
 java.lang.String operator()
          Get the operator of the term.
 
Methods inherited from class nars.language.Statement
getPredicate, getSubject, invalid, invalidStatement, isRelation, make, make, make, makeName, makeStatementName, makeSym
 
Methods inherited from class nars.language.CompoundTerm
addComponents, argumentsToList, cloneComponents, cloneList, componentAt, containAllComponents, containComponent, getComplexity, getComponents, getConstantName, getOpenVariables, isConstant, isOperator, make, make, makeCompoundName, makeImageName, makeSetName, prepareComponentLinks, reduceComponents, renameVariables, renameVariables, replaceComponent, replaceComponent, size, substituteComponent
 
Methods inherited from class nars.language.Term
compareTo, equals, getName, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

temporalOrder

private TemporalValue temporalOrder
Temporal order between the components

Constructor Detail

Equivalence

protected Equivalence(java.lang.String n,
                      java.util.ArrayList<Term> arg,
                      TemporalValue order)
Constructor with partial values, called by make

Parameters:
n - The name of the term
arg - The component list of the term
order - The temporal order of the components

Equivalence

protected Equivalence(java.lang.String n,
                      java.util.ArrayList<Term> cs,
                      java.util.ArrayList<Variable> open,
                      short i,
                      TemporalValue order)
Constructor with full values, called by clone

Parameters:
n - The name of the term
cs - Component list
open - Open variable list
i - Syntactic complexity of the compound
order - The temporal order of the components
Method Detail

clone

public java.lang.Object clone()
Clone an object

Specified by:
clone in class CompoundTerm
Returns:
A new object

make

public static Equivalence make(Term subject,
                               Term predicate,
                               TemporalValue order)
Try to make a new compound from two components. Called by the inference rules.

Parameters:
subject - The first compoment
predicate - The second compoment
order - The temporal order of the components
Returns:
A compound generated or null

operator

public java.lang.String operator()
Get the operator of the term.

Specified by:
operator in class CompoundTerm
Returns:
the operator of the term

isCommutative

public boolean isCommutative()
Check if the compound is communitative.

Overrides:
isCommutative in class CompoundTerm
Returns:
true for communitative

getOrder

public TemporalValue getOrder()
Get the temporal order.

Overrides:
getOrder in class Term
Returns:
the temporal order of the components

getEquivalenceSymbol

public static java.lang.String getEquivalenceSymbol(TemporalValue t)
Get the symbole of the relation by tense

Parameters:
t - The tense of the statement
Returns:
The String representation of the relation