nars.language
Class Conjunction

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

public class Conjunction
extends CompoundTerm

Conjunction of statements


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 Conjunction(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 Conjunction(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 getConjunctionSymbol(TemporalValue t)
          COnvert a temporal into its String representation
 TemporalValue getOrder()
          Return the temporal order.
 boolean isCommutative()
          Check if the compound is communitative.
static boolean isParallel(Term t)
          Whether the Term is a parallel conjunction
static boolean isSequence(Term t)
          Whether the Term is a sequential conjunction
static Term make(java.util.ArrayList<Term> argList, TemporalValue order)
          Try to make a new compound from a list of components.
static Term make(Term term1, Term term2, TemporalValue order)
          Try to make a new compound from two components.
static Term make(java.util.TreeSet<Term> set, TemporalValue order)
          Try to make a new compound from a set of components.
 java.lang.String operator()
          Get the operator of the term.
 
Methods inherited from class nars.language.CompoundTerm
addComponents, argumentsToList, cloneComponents, cloneList, componentAt, containAllComponents, containComponent, getComplexity, getComponents, getConstantName, getOpenVariables, isConstant, isOperator, make, make, makeCompoundName, makeImageName, makeName, 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

Conjunction

protected Conjunction(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

Conjunction

protected Conjunction(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

operator

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

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

getConjunctionSymbol

public static java.lang.String getConjunctionSymbol(TemporalValue t)
COnvert a temporal into its String representation

Parameters:
t - The given temporal value
Returns:
String representation of the order

isCommutative

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

Overrides:
isCommutative in class CompoundTerm
Returns:
true for communitative

getOrder

public TemporalValue getOrder()
Return the temporal order.

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

isParallel

public static boolean isParallel(Term t)
Whether the Term is a parallel conjunction

Parameters:
t - A given term
Returns:
If the term is a paralel conjunction

isSequence

public static boolean isSequence(Term t)
Whether the Term is a sequential conjunction

Parameters:
t - A given term
Returns:
If the term is a sequential conjunction

make

public static Term make(java.util.ArrayList<Term> argList,
                        TemporalValue order)
Try to make a new compound from a list of components. Called by StringParser.

Parameters:
argList - the list of arguments
order - The temporal order of the components
Returns:
the Term generated from the arguments

make

public static Term make(java.util.TreeSet<Term> set,
                        TemporalValue order)
Try to make a new compound from a set of components. Called by the public make methods.

Parameters:
set - a set of Term as compoments
order - The temporal order of the components
Returns:
the Term generated from the arguments

make

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

Parameters:
term1 - The first compoment
term2 - The second compoment
order - The temporal order of the components
Returns:
A compound generated or a term it reduced to