"resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/Am2900.json", "Am2900");
this.amicListeners = new HashSet<>();
- CoreModelParametersBuilder paramsBuilder = new CoreModelParametersBuilder();
+ CoreModelParametersBuilder paramsBuilder = CoreModelParameters.builder();
paramsBuilder.gateProcessTime = 50;
paramsBuilder.hardcodedComponentProcessTime = paramsBuilder.gateProcessTime * 5;
paramsBuilder.wireTravelTime = 10;
import net.mograsim.logic.model.am2900.Am2900Loader;
import net.mograsim.logic.model.model.LogicModelModifiable;
import net.mograsim.logic.model.model.components.ModelComponent;
-import net.mograsim.logic.model.modeladapter.CoreModelParameters.CoreModelParametersBuilder;
+import net.mograsim.logic.model.modeladapter.CoreModelParameters;
import net.mograsim.logic.model.modeladapter.LogicCoreAdapter;
import net.mograsim.logic.model.serializing.IndirectModelComponentCreator;
IndirectModelComponentCreator.createComponent(model, componentID);
LogicCoreAdapter.gateCountsPerComponentClass.clear();
- LogicCoreAdapter.convert(model, new CoreModelParametersBuilder().build());
+ LogicCoreAdapter.convert(model, CoreModelParameters.builder().build());
System.out.println(componentID + ':');
for (Entry<Class<? extends ModelComponent>, Integer> e : LogicCoreAdapter.gateCountsPerComponentClass.entrySet())
public static void executeVisualisation(Consumer<LogicModelModifiable> setupLogicModel, Consumer<VisualisationObjects> beforeRun)
{
- CoreModelParametersBuilder paramsBuilder = new CoreModelParametersBuilder();
+ CoreModelParametersBuilder paramsBuilder = CoreModelParameters.builder();
paramsBuilder.gateProcessTime = 50;
paramsBuilder.hardcodedComponentProcessTime = paramsBuilder.gateProcessTime * 5;
paramsBuilder.wireTravelTime = 10;
this.hardcodedComponentProcessTime = builder.hardcodedComponentProcessTime;
}
+ public static CoreModelParametersBuilder builder()
+ {
+ return new CoreModelParametersBuilder();
+ }
+
public static class CoreModelParametersBuilder
{
public int wireTravelTime;
public int gateProcessTime;
public int hardcodedComponentProcessTime;
+ private CoreModelParametersBuilder()
+ {
+ }
+
public CoreModelParametersBuilder wireTravelTime(int wireTravelTime)
{
this.wireTravelTime = wireTravelTime;
LogicModelModifiable model = new LogicModelModifiable();
- CoreModelParametersBuilder paramsBuilder = new CoreModelParametersBuilder();
+ CoreModelParametersBuilder paramsBuilder = CoreModelParameters.builder();
paramsBuilder.gateProcessTime = 50;
paramsBuilder.hardcodedComponentProcessTime = paramsBuilder.gateProcessTime * 5;
paramsBuilder.wireTravelTime = 10;
import net.mograsim.logic.model.model.components.submodels.SubmodelComponent;
import net.mograsim.logic.model.model.wires.ModelWire;
import net.mograsim.logic.model.model.wires.Pin;
+import net.mograsim.logic.model.modeladapter.CoreModelParameters;
import net.mograsim.logic.model.modeladapter.CoreModelParameters.CoreModelParametersBuilder;
import net.mograsim.logic.model.modeladapter.LogicCoreAdapter;
import net.mograsim.logic.model.preferences.DefaultRenderPreferences;
component.getPins().values().forEach(this::extendModelPin);
// Create core model
- CoreModelParametersBuilder paramsBuilder = new CoreModelParametersBuilder();
+ CoreModelParametersBuilder paramsBuilder = CoreModelParameters.builder();
paramsBuilder.gateProcessTime = 50;
paramsBuilder.hardcodedComponentProcessTime = paramsBuilder.gateProcessTime * 5;
paramsBuilder.wireTravelTime = 10;