|
PMII - JAVA-Packages - Principia Mathematica II | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.meyling.principia.argument.AbstractArgument | +--com.meyling.principia.argument.AbstractDynamicArgumentList
Every Operator with dynamic number of arguments 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()
.
Constructor Summary | |
AbstractDynamicArgumentList(Argument[] arguments)
Constructs an argument list. |
Method Summary | |
void |
add(Argument argument)
Adds an argument to end of dynamic list. |
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. |
void |
insert(int position,
Argument argument)
Inserts an argument to spezified position. |
void |
remove(int i)
Deletes an argument of dynamic list. |
void |
replace(int position,
Argument argument)
Replaces an argument at spezified position. |
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 |
|
Methods inherited from interface com.meyling.principia.argument.Argument |
containsPatternVariables, equals, getPatternVariables, getReplacementParents, getSearchParents, hashCode, matches, matches, replace, replace, replace, replaceMatches |
Constructor Detail |
public AbstractDynamicArgumentList(Argument[] arguments)
arguments
- the arguments to make a list ofIllegalArgumentException
- if the argument was a
nullpointerMethod Detail |
public void add(Argument argument)
argument
- argument to addIllegalArgumentException
- if the given
argument was a nullpointerpublic void insert(int position, Argument argument)
position
- position of argument to addargument
- argument to addIllegalArgumentException
- if the given
argument was a nullpointer or the position
was not validpublic void replace(int position, Argument argument)
position
- position of argument to replaceargument
- replacement argumentIllegalArgumentException
- if the given
argument was a nullpointer or the position
was not validpublic void remove(int i)
i
- position of argument to deleteIllegalArgumentException
- if the given
position was not validpublic final int getArgumentSize()
Argument
getArgumentSize
in interface Argument
getArgumentSize
in class AbstractArgument
com.meyling.principia.argument.Argument
public final Argument getArgument(int i) throws IllegalArgumentException
Argument
getArgument
in interface Argument
getArgument
in class AbstractArgument
com.meyling.principia.argument.Argument
i
- number of argument (starting with 0
)i
-th part formulaIllegalArgumentException
- if i
is not inbetween
0
and Argument.getArgumentSize()
- 1
public final Argument copy()
Argument
copy
in interface Argument
com.meyling.principia.argument.Argument
public abstract Argument create(Argument[] arguments) throws ArgumentException
Argument
create
in interface Argument
create
in class AbstractArgument
com.meyling.principia.argument.Argument
arguments
- with these arguments the operator should
be createdArgumentException
- if creation failedpublic abstract String toString()
Argument
String
form.toString
in interface Argument
toString
in class AbstractArgument
com.meyling.principia.argument.Argument
|
PMII - JAVA-Packages - Principia Mathematica II | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
©left GNU General Public Licence All Rights Reserved. |