|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.xins.common.types.ItemList
Item in a list or a set type.
List| Constructor Summary | |
ItemList()
Creates a new ItemList. |
|
ItemList(boolean setType)
Creates a new ItemList. |
|
| Method Summary | |
void |
add(Collection items)
Adds a list of items to the list or set. |
protected void |
addItem(Object value)
Adds an item to the list. |
Collection |
get()
Gets the list of items as a collection. |
protected Object |
getItem(int index)
Gets the item at the specified index as an Object. |
int |
getSize()
Gets the number of items included in the list. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ItemList()
ItemList.
The list will be able to contain several instances of an object.
public ItemList(boolean setType)
ItemList.
setType - if true an object can be added only once in the list,
if false an object can be added several times in the list.| Method Detail |
public final void add(Collection items)
throws IllegalArgumentException
items - the collection of items to add in the list, cannot be null.
IllegalArgumentException - if items == null.public final Collection get()
java.util.Set or a java.util.List is returned
depending on the type of this list.
null.
the collection returned cannot be modified.
protected final void addItem(Object value)
throws IllegalArgumentException
value - the value of the item to add in the list, cannot be null.
IllegalArgumentException - if value == null.protected final Object getItem(int index)
Object.
index - the position of the required item, it should be >= 0 and < getSize().
null.public int getSize()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||