|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ElementList
Every Operator must implement this interface. Each operator deals with arguments. These arguments
form an ordered list. So there is the number of arguments, which is told by size()
and the
i
-th argument, accessible by getElement(int)
.
Method Summary | |
---|---|
void |
add(Element element)
TODO 20110327 m31: do we have to use modifying methods like this or remove(int)
and so on? If we need them we have to make a deep copy. |
Element |
getElement(int i)
Get the requested argument. |
java.util.List |
getElements()
Get all arguments as an list. |
java.lang.String |
getOperator()
Get the operator. |
void |
insert(int position,
Element element)
Inserts an element to specified position. |
void |
remove(int i)
Deletes an element of element list. |
void |
replace(int position,
Element element)
Replaces an element at specified position. |
int |
size()
Get the number of arguments. |
Methods inherited from interface org.qedeq.kernel.se.base.list.Element |
---|
copy, equals, getAtom, getList, hashCode, isAtom, isList, replace, toString |
Method Detail |
---|
int size()
java.lang.String getOperator()
Element getElement(int i)
i
- Number of argument (starting with 0
).
i
-th part formula.
java.lang.IllegalArgumentException
- i
is not between 0
and
size()
- 1
java.util.List getElements()
void add(Element element)
remove(int)
and so on? If we need them we have to make a deep copy. Otherwise we can save lots of space!
Adds an element to end of list.
element
- Element to add.
java.lang.IllegalArgumentException
- The given element was a NullPointer.void insert(int position, Element element)
position
- Position of element to add.element
- Element to add.
java.lang.IllegalArgumentException
- The given element was a NullPointer or the position was not
valid.void replace(int position, Element element)
position
- Position of element to replace.element
- Replacement element.
java.lang.IllegalArgumentException
- The given element was a NullPointer or the position was not
valid.void remove(int i)
i
- Position of element to remove.
java.lang.IllegalArgumentException
- The given position was not valid.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |