|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--lnsc.DataSet
Container for input patterns set and all relevant information such as output patterns set, target patterns set, error patterns set, internal values and others. Objects are stored and retrieved in it using names assigned to them. Basically any kind of data can be placed in it, but a certain number of names are reserved for some specific data.
DataNames
,
DataSetCollection
,
Serialized FormConstructor Summary | |
DataSet()
Creates an empy data set with initial size INITIAL_SIZE. |
|
DataSet(DataSet newDataSet)
Creates a data set with the same refered data as another one. |
|
DataSet(int initialSize)
Creates an empty data set with given initial size. |
|
DataSet(java.lang.String[] newDataNames,
java.lang.Object[] newDatas)
Creates a data set with initial data into it. |
Method Summary | |
void |
addDataSet(DataSet dataSet,
boolean overwrite)
Adds the content of a second data set to the data set. |
void |
addDataSetww(DataSet dataSet,
boolean overwrite)
Adds the content of a second data set to the data set. |
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)
Returns the data stored under a given name. |
int |
getDataCount()
Returns the number of items in the data set. |
boolean |
hasData(java.lang.String dataName)
Indicates whether the set contains data under a given name. |
void |
removeAllBut(java.lang.String[] keepList)
Removes all the data in the set except the desired ones. |
java.lang.Object |
removeData(java.lang.String dataName)
Removes the data 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 is stored. |
void |
setData(java.lang.String dataName,
java.lang.Object data)
Stores some data under a given name. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public DataSet()
public DataSet(DataSet newDataSet)
newDataSet
- The data set from which to take references.public DataSet(int initialSize)
initialSize
- The initial size.public DataSet(java.lang.String[] newDataNames, java.lang.Object[] newDatas)
newDataNames
- Array of data names.newDatas
- Array of corresponding datas.Method Detail |
public void addDataSet(DataSet dataSet, boolean overwrite)
dataSet
- The data set to add.overwrite
- When true
, data already
existing is overwritten, otherwise, it
the data is not added.public void addDataSetww(DataSet dataSet, boolean overwrite)
dataSet
- The data set to add.overwrite
- When true
, data already
existing is overwritten, otherwise, it
the data is not added.public java.lang.String[] dataNamesList()
public java.lang.Object getData(java.lang.String dataName)
dataName
- Name of the data to be retrieved.
public int getDataCount()
public boolean hasData(java.lang.String dataName)
dataName
- The name to verify if some data 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 to remove.
public java.lang.Object renameData(java.lang.String oldDataName, java.lang.String newDataName)
oldDataName
- Name associate to the data.newDataName
- New name to associate to the data.
public void setData(java.lang.String dataName, java.lang.Object data)
dataName
- Name under which the data will be stored.data
- Data to be stored.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 |