nars.language
Class Disjunction

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

public class Disjunction
extends CompoundTerm

A disjunction of Statements.


Field Summary
 
Fields inherited from class nars.language.CompoundTerm
complexity, components, openVariables
 
Fields inherited from class nars.language.Term
name
 
Constructor Summary
private Disjunction(java.lang.String n, java.util.ArrayList<Term> arg)
          Constructor with partial values, called by make
private Disjunction(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
 java.lang.Object clone()
          Clone an object
 boolean isCommutative()
          Disjunction is communitative.
static Term make(java.util.ArrayList<Term> argList)
          Try to make a new IntersectionExt.
static Term make(Term term1, Term term2)
          Try to make a new Disjunction from two components.
static Term make(java.util.TreeSet<Term> set)
          Try to make a new Disjunction 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, getOrder, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Disjunction

private Disjunction(java.lang.String n,
                    java.util.ArrayList<Term> arg)
Constructor with partial values, called by make

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

Disjunction

private Disjunction(java.lang.String n,
                    java.util.ArrayList<Term> cs,
                    java.util.ArrayList<Variable> open,
                    short i)
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
Method Detail

clone

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

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

make

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

Parameters:
term1 - The first compoment
term2 - The first compoment
Returns:
A Disjunction generated or a Term it reduced to

make

public static Term make(java.util.ArrayList<Term> argList)
Try to make a new IntersectionExt. Called by StringParser.

Parameters:
argList - a list of Term as compoments
Returns:
the Term generated from the arguments

make

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

Parameters:
set - a set of Term as compoments
Returns:
the Term generated from the arguments

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()
Disjunction is communitative.

Overrides:
isCommutative in class CompoundTerm
Returns:
true for communitative