PMII - JAVA-Packages - Principia Mathematica II

com.meyling.principia.logic.basic
Class LogicalOperatorWithTwoFormulas

java.lang.Object
  |
  +--com.meyling.principia.argument.AbstractArgument
        |
        +--com.meyling.principia.argument.AbstractArgumentList
              |
              +--com.meyling.principia.logic.basic.AbstractFormula
                    |
                    +--com.meyling.principia.logic.basic.LogicalOperatorWithTwoFormulas
All Implemented Interfaces:
Argument, Formula
Direct Known Subclasses:
Conjunction, Disjunction, Equivalence, Implication

public abstract class LogicalOperatorWithTwoFormulas
extends AbstractFormula
implements Argument, Formula

LogicalOperatorWithTwoFormulas of formulas.

Version:
$Revision: 1.4 $
Author:
Michael Meyling

Constructor Summary
LogicalOperatorWithTwoFormulas(Argument[] arguments)
          Constructs a new formula out of two given ones.
LogicalOperatorWithTwoFormulas(Formula formula1, Formula formula2)
          Constructs a new formula out of two given ones.
 
Method Summary
 SubjectVariables getBoundSubjectVariables()
          Get all bounded subject variables.
 SubjectVariables getFreeSubjectVariables()
          Get all free subject variables.
 Formula getPartFormula(int i)
          Get the requested part formula
 int getPartFormulaSize()
          Get the number of part formulas that this formula contains.
 SubjectVariables getSubjectVariables()
          Get all subject variables that occur in this formula.
 
Methods inherited from class com.meyling.principia.logic.basic.AbstractFormula
createPattern, replaceBoundSubjectVariable, replaceBoundSubjectVariables
 
Methods inherited from class com.meyling.principia.argument.AbstractArgumentList
copy, create, getArgument, getArgumentSize, toString
 
Methods inherited from class com.meyling.principia.argument.AbstractArgument
containsPatternVariables, equals, getHighestNumber, getPatternVariables, getReplacementParents, getSearchParents, hashCode, matches, matches, replace, replace, replace, replaceMatches
 
Methods inherited from class java.lang.Object
, clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.meyling.principia.argument.Argument
containsPatternVariables, copy, create, equals, getArgument, getArgumentSize, getPatternVariables, getReplacementParents, getSearchParents, hashCode, matches, matches, replace, replace, replace, replaceMatches, toString
 
Methods inherited from interface com.meyling.principia.logic.basic.Formula
replaceBoundSubjectVariable, replaceBoundSubjectVariables
 

Constructor Detail

LogicalOperatorWithTwoFormulas

public LogicalOperatorWithTwoFormulas(Argument[] arguments)
                               throws ArgumentException
Constructs a new formula out of two given ones.
Parameters:
arguments - must contain two formulas
Throws:
ArgumentException - if same subject variable exists bound and unbound, or argument dosn't consist of two formulas

LogicalOperatorWithTwoFormulas

public LogicalOperatorWithTwoFormulas(Formula formula1,
                                      Formula formula2)
                               throws ArgumentException
Constructs a new formula out of two given ones.
Parameters:
formula1 - first formula
formula2 - second formula
Throws:
ArgumentException - if same subject variable exists bound and unbound
Method Detail

getPartFormulaSize

public final int getPartFormulaSize()
Description copied from interface: Formula
Get the number of part formulas that this formula contains.
Specified by:
getPartFormulaSize in interface Formula
Overrides:
getPartFormulaSize in class AbstractFormula
Returns:
always 2

getPartFormula

public final Formula getPartFormula(int i)
Description copied from interface: Formula
Get the requested part formula
Specified by:
getPartFormula in interface Formula
Overrides:
getPartFormula in class AbstractFormula
Following copied from interface: com.meyling.principia.logic.basic.Formula
Parameters:
i - number of part formula (starting with 0)
Returns:
i-th part formula
Throws:
IllegalArgumentException - if i is not inbetween 0 and Formula.getPartFormulaSize() - 1

getFreeSubjectVariables

public final SubjectVariables getFreeSubjectVariables()
Description copied from interface: Formula
Get all free subject variables.
Specified by:
getFreeSubjectVariables in interface Formula
Overrides:
getFreeSubjectVariables in class AbstractFormula
Following copied from interface: com.meyling.principia.logic.basic.Formula
Returns:
all free subject variables

getBoundSubjectVariables

public final SubjectVariables getBoundSubjectVariables()
Description copied from interface: Formula
Get all bounded subject variables.
Specified by:
getBoundSubjectVariables in interface Formula
Overrides:
getBoundSubjectVariables in class AbstractFormula
Following copied from interface: com.meyling.principia.logic.basic.Formula
Returns:
all bounded subject variables

getSubjectVariables

public SubjectVariables getSubjectVariables()
Description copied from interface: Formula
Get all subject variables that occur in this formula.
Specified by:
getSubjectVariables in interface Formula
Overrides:
getSubjectVariables in class AbstractFormula
Following copied from interface: com.meyling.principia.logic.basic.Formula
Returns:
all subject variables

PMII - JAVA-Packages - Principia Mathematica II

©left GNU General Public Licence
All Rights Reserved.