Hilbert II - Version 0.03.04

org.qedeq.kernel.base.list
Interface ElementList

All Superinterfaces:
Element
All Known Implementing Classes:
DefaultElementList

public interface ElementList
extends Element

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).

Version:
$Revision: 1.2 $

Method Summary
 void add(Element element)
          Adds an element to end of list.
 Element getElement(int i)
          Get the requested argument.
 List getElements()
          Get all arguments as an list.
 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.base.list.Element
copy, equals, getAtom, getList, hashCode, isAtom, isList, replace, toString
 

Method Detail

size

public int size()
Get the number of arguments.

Returns:
Number of arguments.

getOperator

public String getOperator()
Get the operator.

Returns:
Operator.

getElement

public Element getElement(int i)
Get the requested argument.

Parameters:
i - Number of argument (starting with 0).
Returns:
i-th part formula.
Throws:
IllegalArgumentException - i is not between 0 and size() - 1

getElements

public List getElements()
Get all arguments as an list.

Returns:
All elements.

add

public void add(Element element)
Adds an element to end of list.

Parameters:
element - Element to add.
Throws:
IllegalArgumentException - The given element was a NullPointer.

insert

public void insert(int position,
                   Element element)
Inserts an element to specified position.

Parameters:
position - Position of element to add.
element - Element to add.
Throws:
IllegalArgumentException - The given element was a NullPointer or the position was not valid.

replace

public void replace(int position,
                    Element element)
Replaces an element at specified position.

Parameters:
position - Position of element to replace.
element - Replacement element.
Throws:
IllegalArgumentException - The given element was a NullPointer or the position was not valid.

remove

public void remove(int i)
Deletes an element of element list.

Parameters:
i - Position of element to remove.
Throws:
IllegalArgumentException - The given position was not valid.

Hilbert II - Version 0.03.04

©left GNU General Public Licence
All Rights Reserved.