|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IList<T>
In the SED domain, list of objects might be inconsistent even though the objects come from the same classe. For example an SED must have segments with interconvertible units. This interfaces allows to define "more-than-type-safe" lists, since its add methods throw an exception when some sort of consistency check fails. Also, this interface supports IDs for lists.
Method Summary | |
---|---|
void |
add(int position,
T element)
Add an element in a certain position. |
boolean |
add(T element)
Add an element to this list. |
boolean |
addAll(Collection<? extends T> elements)
Add a collection of elements this list. |
boolean |
addAll(IList<? extends T> elements)
Add an IList of elements to this list. |
T |
get(int i)
|
String |
getId()
Get the ID string for this list. |
boolean |
isEmpty()
Check whether this list is empty. |
boolean |
remove(T element)
Remove an element from this list. |
void |
setId(String id)
Set the ID string for this list. |
int |
size()
Get the size of this list. |
Methods inherited from interface java.lang.Iterable |
---|
iterator |
Method Detail |
---|
String getId()
void setId(String id)
id
- The ID string.boolean add(T element) throws SedException
element
- The element to be added.
SedException
- An Exception is thrown when the element fails a compatibility check.boolean addAll(Collection<? extends T> elements) throws SedException
elements
- The elements to be added.
SedException
- An Exception is thrown when an element in the collection fails a compatibility check.boolean addAll(IList<? extends T> elements) throws SedException
elements
- The elements to be added.
SedException
- An Exception is thrown when an element in the IList fails a compatibility check.void add(int position, T element) throws SedException
position
- The position in which the element has to be added.element
- The element to be added.
SedException
- SedException An Exception is thrown when the element fails a compatibility check.boolean remove(T element)
element
- The element to be removed.
int size()
boolean isEmpty()
T get(int i)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |