|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdata.DataHandler
data.OptimizationDataHandler
public class OptimizationDataHandler
Extends DataHandler by supporting a getBestDesign() method:
automatically orders DataPoints as they are added, using a
DataPointComparer. Perhaps this can be modified to support other
comparators as well.
| Field Summary |
|---|
| Fields inherited from class data.DataHandler |
|---|
lastBlock |
| Constructor Summary | |
|---|---|
OptimizationDataHandler()
Default constructor. |
|
OptimizationDataHandler(java.util.Comparator<DataPoint> comparator)
Constructs an OptimizationDataHandler using the supplied comparator to sort designs. |
|
| Method Summary | |
|---|---|
boolean |
add(DataPoint dataPoint)
Adds the given DataPoint to the set of data. |
void |
clear()
Clears all data. |
DataPoint |
getBestDesign()
Returns the best design in the set of data. |
DataPoint |
remove(int index)
Removes the DataPoint at the specified index. |
| Methods inherited from class data.DataHandler |
|---|
addBlock, addListener, contains, get, getDataListeners, indexOf, isEmpty, iterator, remove, removeLastBlock, removeListener, removeRange, size, writeToFile |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OptimizationDataHandler()
public OptimizationDataHandler(java.util.Comparator<DataPoint> comparator)
comparator - the given comparator.| Method Detail |
|---|
public boolean add(DataPoint dataPoint)
DataHandlerDataPoint to the set of data. Notifies
DataListeners of the addition.
add in class DataHandlerdataPoint - the given DataPoint.ArrayList.add(java.lang.Object)public void clear()
DataHandlerDataListeners of the change.
clear in class DataHandlerArrayList.clear()public DataPoint getBestDesign()
DataPointComparer.public DataPoint remove(int index)
DataHandlerDataPoint at the specified index. Notifies
DataListeners.
remove in class DataHandlerArrayList.remove(int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||