Class AbstractScesimModel<T extends AbstractScesimData>
- java.lang.Object
-
- org.drools.scenariosimulation.api.model.AbstractScesimModel<T>
-
- Direct Known Subclasses:
Background,Simulation
public abstract class AbstractScesimModel<T extends AbstractScesimData> extends java.lang.ObjectAbstract class representing the content model of the grid, to be extended by concrete implementations
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<T>scesimDataContains list of scenarios to testprotected ScesimModelDescriptorscesimModelDescriptorDescribes structure of the simulation
-
Constructor Summary
Constructors Constructor Description AbstractScesimModel()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description TaddData()abstract TaddData(int index)voidclear()voidclearDatas()protected voidclearDatas(FactMapping toRemove)TcloneData(int sourceIndex, int targetIndex)abstract AbstractScesimModel<T>cloneModel()TgetDataByIndex(int index)ScesimModelDescriptorgetScesimModelDescriptor()java.util.List<T>getUnmodifiableData()Returns an unmodifiable list wrapping the backed onevoidremoveData(T toRemove)voidremoveDataByIndex(int index)voidremoveFactMapping(FactMapping toRemove)voidremoveFactMappingByIndex(int index)voidreplaceData(int index, T newScesimData)voidresetErrors()protected <Z extends ScesimDataWithIndex<T>>
java.util.List<Z>toScesimDataWithIndex(java.util.function.BiFunction<java.lang.Integer,T,Z> producer)
-
-
-
Field Detail
-
scesimModelDescriptor
protected final ScesimModelDescriptor scesimModelDescriptor
Describes structure of the simulation
-
scesimData
protected final java.util.List<T extends AbstractScesimData> scesimData
Contains list of scenarios to test
-
-
Method Detail
-
cloneModel
public abstract AbstractScesimModel<T> cloneModel()
-
addData
public abstract T addData(int index)
-
getUnmodifiableData
public java.util.List<T> getUnmodifiableData()
Returns an unmodifiable list wrapping the backed one- Returns:
-
removeDataByIndex
public void removeDataByIndex(int index)
-
removeData
public void removeData(T toRemove)
-
getDataByIndex
public T getDataByIndex(int index)
-
addData
public T addData()
-
replaceData
public void replaceData(int index, T newScesimData)
-
cloneData
public T cloneData(int sourceIndex, int targetIndex)
-
clear
public void clear()
-
clearDatas
public void clearDatas()
-
resetErrors
public void resetErrors()
-
getScesimModelDescriptor
public ScesimModelDescriptor getScesimModelDescriptor()
-
removeFactMappingByIndex
public void removeFactMappingByIndex(int index)
-
removeFactMapping
public void removeFactMapping(FactMapping toRemove)
-
clearDatas
protected void clearDatas(FactMapping toRemove)
-
toScesimDataWithIndex
protected <Z extends ScesimDataWithIndex<T>> java.util.List<Z> toScesimDataWithIndex(java.util.function.BiFunction<java.lang.Integer,T,Z> producer)
-
-