|
LEONARDI Application Composer - 8.9.0.40 by W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectleon.info.LyInfoList<Info>
leon.info.LyInfoDataList<Info,Data>
public final class LyInfoDataList<Info extends LyInfo,Data>
This class is an utility class to manage a list of Info with an associated data. This data is
untyped to allow different usages.
By default, this list doesn't accept multiple occurrences of the same pair (info, data) but this
mode can be set on to enable them (this mode can only be chosen at beginning).
At start, these lists are writable, but can't be modified anymore, once turned to unwritable.
LyInfo
,
LyObjectInfo
Field Summary | |
---|---|
static java.lang.String |
__VERSION
|
Constructor Summary | |
---|---|
LyInfoDataList()
Default constructor with no parameters. |
|
LyInfoDataList(boolean multiple)
Constructor with choice of multiple occurrences or not. |
|
LyInfoDataList(LyInfoDataList<Info,Data> infoDataList)
Constructor with choice of multiple occurrences or not. |
Method Summary | |
---|---|
int |
addInfo(Info info,
Data data)
Adds a new pair (info, data) to this list at the end of the list. |
int |
addInfo(Info info,
Data data,
int position)
Adds a new pair (info, data) to this list at the given position. |
int |
addInfo(Info info,
int position)
Adds a new info with no associated data to this list at the given position. |
void |
addList(LyInfoDataList<Info,Data> list)
Adds all infos of the given list to this list. |
boolean |
contains(Info info,
Data data)
Checks if the given pair (info, data) is contained in this list. |
Data |
getData(Info info)
Gets data associated to the given info. |
Data |
getData(int index)
Gets data at the specified index. |
int |
getIndex(Info info,
Data data)
Get index of a pair (info, data) in this list. |
int |
removeInfo(Info info)
Removes the specified info from the info list. |
int |
removeInfo(Info info,
Data data)
Removes the specified pair (info, data) from this list. |
void |
resetInfos()
Resets this list (remove all pairs from this list). |
Methods inherited from class leon.info.LyInfoList |
---|
addInfo, addList, addList, clone, contains, contains, contains, equals, getComponentType, getIndex, getInfo, getInfo, getInfo, getInfos, getInfos, getInfos, getInfos, getInfos, getInfos, getInfosById, getInfosByName, getInfosByName, getObjectInfosByName, getObjectInfosByName, getSize, isWritable, lock, toArray, toString |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String __VERSION
Constructor Detail |
---|
public LyInfoDataList()
public LyInfoDataList(boolean multiple)
multiple
- Boolean indicating if multiple occurrences are allowed or not.public LyInfoDataList(LyInfoDataList<Info,Data> infoDataList)
multiple
- Boolean indicating if multiple occurrences are allowed or not.Method Detail |
---|
public Data getData(int index)
index
- Index of the requested data.
java.lang.ArrayIndexOutOfBoundsException
- If index is negative, or greater than or equal to
the number of infos in the list.public Data getData(Info info)
info
- Info for which an associated data is searched.
java.lang.IllegalArgumentException
- If the given info is not in this list.public int addInfo(Info info, Data data, int position)
info
- Info that should be added.data
- Data associated to the info.position
- Position where this pair has to be added. A negative index or an index
greater than or equal to the number of infos in this list, means insert
at the end of the list.
java.lang.IllegalStateException
- If this list is not writable.public int addInfo(Info info, Data data)
info
- Info that should be added.data
- Data associated to the info.
java.lang.IllegalStateException
- If this list is not writable.public int addInfo(Info info, int position)
addInfo
in class LyInfoList<Info extends LyInfo>
info
- Info that should be added.position
- Position where this info must be added. A negative index or an index
greater than or equal to the number of infos in this list, means insert
at the end of the list.
java.lang.IllegalStateException
- If this list is not writable.public int removeInfo(Info info)
removeInfo
in class LyInfoList<Info extends LyInfo>
info
- Info to remove.
public int removeInfo(Info info, Data data)
info
- Info to remove.data
- Data associated to the info.
java.lang.IllegalStateException
- If this list is not writable.public void addList(LyInfoDataList<Info,Data> list)
list
- List of infos to add to this list.
java.lang.IllegalStateException
- If this list is not writable.public void resetInfos()
resetInfos
in class LyInfoList<Info extends LyInfo>
java.lang.IllegalStateException
- If this list is not writable.public int getIndex(Info info, Data data)
info
- The searched info.data
- Associated data (null means no data).
public boolean contains(Info info, Data data)
info
- The searched info.info
- Its associated data.
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |