|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<Arguments.Argument>
cz.cuni.amis.pogamut.sposh.elements.Arguments
public class Arguments
This class represents arguments passed to PrimitiveCall. PrimitiveCall
can reference either normal IAction, ActionPattern or Competence
that will get these arguments, mix them with their own FormalParameters
and create the values for the Action/C/AP.
Arguments is stored as list of Arguments.Argument, each argument is basically
(key; argument) pair. Arguments are sorted according to the key. What is the
key? Either a variable name of the argument in the list or
arguments. Variable names have '$' prefix, e.g. $name.
TODO: This probably doesn;t need to be abstract list
Example: call run($dest="street", $speed=$number) will create Arguments
with two arguments, value arg $dest and variable arg $speed.
| Nested Class Summary | |
|---|---|
static class |
Arguments.Argument
Representation of argument in Yaposh plan. |
protected static class |
Arguments.ValueArgument
This argument is a static value, neverchanging, e.g. |
protected static class |
Arguments.VariableArgument
This argument value is dependent on value of some variable. |
| Field Summary | |
|---|---|
static Arguments |
EMPTY
|
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
|
Arguments()
Create a new list of call parameters. |
protected |
Arguments(Arguments parameters)
Copy constructor. |
| Method Summary | |
|---|---|
void |
add(int index,
Arguments.Argument element)
Add argument at specified index. |
boolean |
addFormal(Arguments.Argument newArgument,
FormalParameters formalParams)
Add argument to this list + following check: This list doesn't containe argument with same name as @newArgument. |
Arguments.Argument |
get(int index)
Get indexth argument according to order of specification. |
String[] |
getAllNames()
Get all names of arguments, sorted. |
int |
size()
|
String |
toString()
Get string representation of arguments (comma separated arguments, compatible with lap). |
| Methods inherited from class java.util.AbstractList |
|---|
add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray |
| Field Detail |
|---|
public static Arguments EMPTY
| Constructor Detail |
|---|
public Arguments()
Every added variable parameter has to be checked against list of formal parameters.
protected Arguments(Arguments parameters)
parameters - orginal| Method Detail |
|---|
public String[] getAllNames()
public Arguments.Argument get(int index)
get in interface List<Arguments.Argument>get in class AbstractList<Arguments.Argument>index - Index of argument.public int size()
size in interface Collection<Arguments.Argument>size in interface List<Arguments.Argument>size in class AbstractCollection<Arguments.Argument>arguments does this list hold.
public void add(int index,
Arguments.Argument element)
add in interface List<Arguments.Argument>add in class AbstractList<Arguments.Argument>index - Index at which to add argumentelement - Argument to add
public boolean addFormal(Arguments.Argument newArgument,
FormalParameters formalParams)
newArgument - Argument to add to this list.formalParams - Parameters that are used for check if @newArgument is varaiblae arg.
IllegalArgumentException - If the check failspublic String toString()
toString in class AbstractCollection<Arguments.Argument>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||