Clover Coverage Report
Coverage timestamp: Sa Aug 2 2008 13:56:27 CEST
0   99   0   -
0   12   -   0
0     -  
1    
 
  ElementList       Line # 30 0 0 - -1.0
 
No Tests
 
1    /* $Id: ElementList.java,v 1.3 2008/03/27 05:16:28 m31 Exp $
2    *
3    * This file is part of the project "Hilbert II" - http://www.qedeq.org
4    *
5    * Copyright 2000-2008, Michael Meyling <mime@qedeq.org>.
6    *
7    * "Hilbert II" is free software; you can redistribute
8    * it and/or modify it under the terms of the GNU General Public
9    * License as published by the Free Software Foundation; either
10    * version 2 of the License, or (at your option) any later version.
11    *
12    * This program is distributed in the hope that it will be useful,
13    * but WITHOUT ANY WARRANTY; without even the implied warranty of
14    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15    * GNU General Public License for more details.
16    */
17   
18    package org.qedeq.kernel.base.list;
19   
20    import java.util.List;
21   
22    /**
23    * Every Operator must implement this interface. Each operator deals with arguments. These arguments
24    * form an ordered list. So there is the number of arguments, which is told by {@link #size} and the
25    * <code>i</code>-th argument, accessible by {@link #getElement(int)}.
26    *
27    * @version $Revision: 1.3 $
28    * @author Michael Meyling
29    */
 
30    public interface ElementList extends Element {
31   
32    /**
33    * Get the number of arguments.
34    *
35    * @return Number of arguments.
36    */
37    public int size();
38   
39    /**
40    * Get the operator.
41    *
42    * @return Operator.
43    */
44    public String getOperator();
45   
46    /**
47    * Get the requested argument.
48    *
49    * @param i Number of argument (starting with <code>0</code>).
50    * @return <code>i</code>-th part formula.
51    * @throws IllegalArgumentException <code>i</code> is not between <code>0</code> and
52    * <code>{@link #size()} - 1</code>
53    */
54    public Element getElement(int i);
55   
56    /**
57    * Get all arguments as an list.
58    *
59    * @return All elements.
60    */
61    public List getElements();
62   
63    /**
64    * Adds an element to end of list.
65    *
66    * @param element Element to add.
67    * @throws IllegalArgumentException The given element was a NullPointer.
68    */
69    public void add(final Element element);
70   
71    /**
72    * Inserts an element to specified position.
73    *
74    * @param position Position of element to add.
75    * @param element Element to add.
76    * @throws IllegalArgumentException The given element was a NullPointer or the position was not
77    * valid.
78    */
79    public void insert(int position, final Element element);
80   
81    /**
82    * Replaces an element at specified position.
83    *
84    * @param position Position of element to replace.
85    * @param element Replacement element.
86    * @throws IllegalArgumentException The given element was a NullPointer or the position was not
87    * valid.
88    */
89    public void replace(int position, final Element element);
90   
91    /**
92    * Deletes an element of element list.
93    *
94    * @param i Position of element to remove.
95    * @throws IllegalArgumentException The given position was not valid.
96    */
97    public void remove(final int i);
98   
99    }