Class DatasetHelper
- java.lang.Object
-
- adams.gui.tools.wekainvestigator.evaluation.DatasetHelper
-
public class DatasetHelper extends Object
Helper class for dealing with datasets.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
-
-
Constructor Summary
Constructors Constructor Description DatasetHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<String>generateDatasetList(List<DataContainer> conts)Generates the list of datasets for a combobox.static booleanhasDataChanged(List<String> newDatasets, ComboBoxModel<String> currentModel)Checks whether the data has changed and the model needs updating.static intindexOfDataset(List<DataContainer> conts, String oldDataset)Determines the index of the old dataset name in the current dataset model.
-
-
-
Method Detail
-
hasDataChanged
public static boolean hasDataChanged(List<String> newDatasets, ComboBoxModel<String> currentModel)
Checks whether the data has changed and the model needs updating.- Parameters:
newDatasets- the new list of datasetscurrentModel- the current model- Returns:
- true if changed
-
indexOfDataset
public static int indexOfDataset(List<DataContainer> conts, String oldDataset)
Determines the index of the old dataset name in the current dataset model.- Parameters:
conts- the list of data containers to useoldDataset- the old dataset to look for- Returns:
- the index, -1 if not found
-
generateDatasetList
public static List<String> generateDatasetList(List<DataContainer> conts)
Generates the list of datasets for a combobox.- Parameters:
conts- the list of data containers to use- Returns:
- the list
-
-