|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--lnsc.DataSetCollection
Zero-based ordered collection of data sets containing similar data. Those data can be directly access throught their name and data set index.
DataNames
,
DataSet
,
Serialized FormConstructor Summary | |
DataSetCollection()
Creates an empy data set collection with initial size INITIAL_SIZE. |
|
DataSetCollection(DataSet[] newDataSets)
Creates a data set collection with initial data set into it. |
|
DataSetCollection(int initialSize)
Creates an empty data set collection with given initial size. |
Method Summary | |
java.lang.String[] |
dataNamesList()
Returns a list of the names of the data contained in the set. |
java.lang.Object |
getData(java.lang.String dataName,
int dataIndex)
Returns the data stored under a given name and index. |
java.lang.Object[] |
getDataCollection(java.lang.String dataName)
Returns the data collection stored under a given name. |
int |
getDataCount()
Returns the number of data items in the data set collection. |
DataSet |
getDataSet(int index)
Returns the data set stored under a given index. |
int |
getDataSetCount()
Returns the number of data sets in the collection. |
boolean |
hasData(java.lang.String dataName)
Indicates whether the set contains data collection under a given name. |
void |
removeAllBut(java.lang.String[] keepList)
Removes all the data collection in the set except the desired ones. |
java.lang.Object[] |
removeData(java.lang.String dataName)
Removes the data collection stored under a given name and returns it. |
java.lang.Object[] |
renameData(java.lang.String oldDataName,
java.lang.String newDataName)
Changes the name under which some data collection is stored. |
void |
setData(java.lang.String dataName,
int dataIndex,
java.lang.Object data)
Stores some data under a given name and index. |
void |
setDataSet(int dataIndex,
DataSet dataSet,
boolean overwrite)
Stores a data set under a given index. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public DataSetCollection()
public DataSetCollection(DataSet[] newDataSets)
newDataSets
- Array of corresponding data sets.public DataSetCollection(int initialSize)
initialSize
- The initial size.Method Detail |
public java.lang.String[] dataNamesList()
public java.lang.Object getData(java.lang.String dataName, int dataIndex)
dataName
- Name of the data to be retrieved.
public java.lang.Object[] getDataCollection(java.lang.String dataName)
dataName
- Name of the data collection to be retrieved.
public int getDataCount()
public DataSet getDataSet(int index)
index
- Index of the data set to be retrieved.
public int getDataSetCount()
public boolean hasData(java.lang.String dataName)
dataName
- The name to verify if some data
collection is attached to it.
true
if there is some data under the given name.public void removeAllBut(java.lang.String[] keepList)
public java.lang.Object[] removeData(java.lang.String dataName)
dataName
- Name of the data collection to remove.
public java.lang.Object[] renameData(java.lang.String oldDataName, java.lang.String newDataName)
oldDataName
- Name associate to the data collection.newDataName
- New name to associate to the data collection.
public void setData(java.lang.String dataName, int dataIndex, java.lang.Object data)
dataName
- Name under which the data will be stored.dataIndex
- Index under which the data will be stored.data
- Data to be stored.public void setDataSet(int dataIndex, DataSet dataSet, boolean overwrite)
dataIndex
- Index under which the data will be stored.dataSet
- Data set to be stored.overwrite
- When true
, data already
existing is overwritten, otherwise, it
the data is not added.public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |