Hilbert II - JAVA-Packages - Principia Mathematica II

com.meyling.principia.argument
Class AbstractArgumentAtom

java.lang.Object
  extended bycom.meyling.principia.argument.AbstractArgument
      extended bycom.meyling.principia.argument.AbstractArgumentAtom
All Implemented Interfaces:
Argument
Direct Known Subclasses:
Counter, Text

public abstract class AbstractArgumentAtom
extends AbstractArgument
implements Argument

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

Version:
$Revision: 1.5 $
Author:
Michael Meyling

Constructor Summary
AbstractArgumentAtom()
           
 
Method Summary
abstract  Argument copy()
          Returns an identical object (maybe "this").
 Argument create(Argument[] arguments)
          Create a new Argument with given arguments.
abstract  boolean equals(Object object)
          Is this object equal to the given one?
 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, 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, getPatternVariables, getReplacementParents, getSearchParents, hashCode, matches, matches, replace, replace, replace, replaceMatches
 

Constructor Detail

AbstractArgumentAtom

public AbstractArgumentAtom()
Method Detail

getArgumentSize

public int getArgumentSize()
Description copied from interface: Argument
Get the number of arguments.

Specified by:
getArgumentSize in interface Argument
Specified by:
getArgumentSize in class AbstractArgument
Returns:
always 0

getArgument

public Argument getArgument(int i)
                     throws IllegalArgumentException
Description copied from interface: Argument
Get the requested argument.

Specified by:
getArgument in interface Argument
Specified by:
getArgument in class AbstractArgument
Parameters:
i - number of argument
Returns:
will never return anything, this is an Atom
Throws:
IllegalArgumentException - will always be thrown

equals

public abstract boolean equals(Object object)
Description copied from interface: Argument
Is this object equal to the given one? This is true iff object is an instance of Argument and both arguments have the same Argument.getArgumentSize() and each Argument.getArgument(int) Argument.equals(java.lang.Object).

Specified by:
equals in interface Argument
Overrides:
equals in class AbstractArgument

copy

public abstract Argument copy()
Description copied from interface: Argument
Returns an identical object (maybe "this").

Specified by:
copy in interface Argument
Returns:
copy of this object

create

public final Argument create(Argument[] arguments)
Description copied from interface: Argument
Create a new Argument with given arguments.

Specified by:
create in interface Argument
Specified by:
create in class AbstractArgument

toString

public abstract String toString()
Description copied from interface: Argument
Get the argument in String form.

Specified by:
toString in interface Argument
Specified by:
toString in class AbstractArgument

Hilbert II - JAVA-Packages - Principia Mathematica II

©left GNU General Public Licence
All Rights Reserved.