com.meyling.principia.logic.basic
Class Negation
java.lang.Object
|
+--com.meyling.principia.argument.AbstractArgument
|
+--com.meyling.principia.argument.AbstractArgumentList
|
+--com.meyling.principia.logic.basic.AbstractFormula
|
+--com.meyling.principia.logic.basic.Negation
- All Implemented Interfaces:
- Argument, Formula
- public class Negation
- extends AbstractFormula
- implements Argument, Formula
Logical negation, logical "not".
- Version:
- $Revision: 1.4 $
- Author:
- Michael Meyling
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 interface com.meyling.principia.argument.Argument |
containsPatternVariables, copy, equals, getArgument, getArgumentSize, getPatternVariables, getReplacementParents, getSearchParents, hashCode, matches, matches, replace, replace, replace, replaceMatches |
Negation
public Negation(Argument[] arguments)
throws ArgumentException
- Constructs negation of first argument.
- Parameters:
arguments
- formula to negate- Throws:
ArgumentException
- if there is not exactly one
argument that is an instance of Formula
Negation
public Negation(Formula formula)
throws ArgumentException
- Constructs negation of formula.
- Parameters:
formula
- formula to negate- Throws:
ArgumentException
- should never occur
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:
1
, the number of part formulas
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 final 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
create
public final Argument create(Argument[] arguments)
throws ArgumentException
- Description copied from interface:
Argument
- Create a new Argument with given arguments.
- Specified by:
create
in interface Argument
- Overrides:
create
in class AbstractArgumentList
- Following copied from interface:
com.meyling.principia.argument.Argument
- Parameters:
arguments
- with these arguments the operator should
be created- Returns:
- new constructed Argument
- Throws:
ArgumentException
- if creation failed
toString
public final String toString()
- Description copied from interface:
Argument
- Get the argument in
String
form.
- Specified by:
toString
in interface Argument
- Overrides:
toString
in class AbstractArgumentList
- Following copied from interface:
com.meyling.principia.argument.Argument
- Returns:
- readable formula