|
||||||||||
| 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().
| Field Summary | |
private List |
arguments
here is are the arguments stored |
| 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 |
| Field Detail |
private List arguments
| Constructor Detail |
public AbstractDynamicArgumentList(Argument[] arguments)
arguments - the arguments to make a list ofIllegalArgumentException - if the argument was a
nullpointer| Method Detail |
public void add(Argument argument)
argument - argument to addIllegalArgumentException - if the given
argument was a nullpointer
public 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 valid
public 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()
ArgumentgetArgumentSize in interface ArgumentgetArgumentSize in class AbstractArgumentcom.meyling.principia.argument.Argument
public final Argument getArgument(int i)
throws IllegalArgumentException
ArgumentgetArgument in interface ArgumentgetArgument in class AbstractArgumentcom.meyling.principia.argument.Argumenti - number of argument (starting with 0)i-th part formulaIllegalArgumentException - if i is not inbetween
0 and Argument.getArgumentSize() - 1public final Argument copy()
Argumentcopy in interface Argumentcom.meyling.principia.argument.Argument
public abstract Argument create(Argument[] arguments)
throws ArgumentException
Argumentcreate in interface Argumentcreate in class AbstractArgumentcom.meyling.principia.argument.Argumentarguments - with these arguments the operator should
be createdArgumentException - if creation failedpublic abstract String toString()
ArgumentString form.toString in interface ArgumenttoString in class AbstractArgumentcom.meyling.principia.argument.Argument
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||