PMII - JAVA-Packages - Principia Mathematica II

com.meyling.principia.argument
Class AbstractArgumentList

java.lang.Object
  |
  +--com.meyling.principia.argument.AbstractArgument
        |
        +--com.meyling.principia.argument.AbstractArgumentList
All Implemented Interfaces:
Argument
Direct Known Subclasses:
Abbreviation, AbstractFormula, AddAxiom, AddSentence, ApplyAxiom, ApplySentence, Author, Axiom, ConjunctionRule, Description, ElementaryEquivalence, Email, Generalization, Header, Headline, HypotheticalSyllogism, Import, LeftAddition, LeftAdditionConjunction, LeftAdditionEquivalence, LeftAdditionImplication, LinkLabel, LinkReference, Location, ModusPonens, Name, Particularization, ProofLine, RegularArgumentList, RenameBoundSubjectVariable, RenameFreeSubjectVariable, ReplacePredicateVariable, ReplacePropositionVariable, ReverseAbbreviation, ReverseImplication, RightAddition, RightAdditionConjunction, RightAdditionEquivalence, RightAdditionImplication, Sentence, Specification, SubjectVariable, SubstLine, UseAbbreviation, Version

public abstract class AbstractArgumentList
extends AbstractArgument
implements Argument

Every Operator must inherit from this class. Its main function is to provide the standard implemention of AbstractArgument.equals(java.lang.Object), AbstractArgument.matches(com.meyling.principia.argument.Argument, com.meyling.principia.argument.PatternVariables) and AbstractArgument.hashCode().

Version:
$Revision: 1.3 $
Author:
Michael Meyling

Constructor Summary
AbstractArgumentList(Argument[] arguments)
          Constructs an argument list.
 
Method Summary
 Argument copy()
          Returns an identical object (maybe "this").
abstract  Argument create(Argument[] arguments)
          Create a new Argument with given arguments.
 Argument getArgument(int i)
          Get the requested argument.
 int getArgumentSize()
          Get the number of arguments.
abstract  String toString()
          Get the argument in String form.
 
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, equals, getPatternVariables, getReplacementParents, getSearchParents, hashCode, matches, matches, replace, replace, replace, replaceMatches
 

Constructor Detail

AbstractArgumentList

public AbstractArgumentList(Argument[] arguments)
Constructs an argument list.
Parameters:
arguments - the arguments to make a list of
Throws:
IllegalArgumentException - if the argument was a nullpointer
Method Detail

getArgumentSize

public final int getArgumentSize()
Description copied from interface: Argument
Get the number of arguments.
Specified by:
getArgumentSize in interface Argument
Overrides:
getArgumentSize in class AbstractArgument
Following copied from interface: com.meyling.principia.argument.Argument
Returns:
number of arguments

getArgument

public final Argument getArgument(int i)
                           throws IllegalArgumentException
Description copied from interface: Argument
Get the requested argument.
Specified by:
getArgument in interface Argument
Overrides:
getArgument in class AbstractArgument
Following copied from interface: com.meyling.principia.argument.Argument
Parameters:
i - number of argument (starting with 0)
Returns:
i-th part formula
Throws:
IllegalArgumentException - if i is not inbetween 0 and Argument.getArgumentSize() - 1

copy

public final Argument copy()
Description copied from interface: Argument
Returns an identical object (maybe "this").
Specified by:
copy in interface Argument
Following copied from interface: com.meyling.principia.argument.Argument
Returns:
copy of this object

create

public abstract 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 AbstractArgument
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 abstract String toString()
Description copied from interface: Argument
Get the argument in String form.
Specified by:
toString in interface Argument
Overrides:
toString in class AbstractArgument
Following copied from interface: com.meyling.principia.argument.Argument
Returns:
readable formula

PMII - JAVA-Packages - Principia Mathematica II

©left GNU General Public Licence
All Rights Reserved.