1 package net.mograsim.logic.model.snippets.highlevelstatehandlers.standard.atomic;
3 import java.util.function.Consumer;
5 import com.google.gson.JsonElement;
7 import net.mograsim.logic.model.serializing.JSONSerializable;
8 import net.mograsim.logic.model.snippets.HighLevelStateHandler;
10 public interface AtomicHighLevelStateHandler extends JSONSerializable
13 * Gets the current value of the atomic high level state represented by this AtomicHighLevelStateHandler.<br>
14 * See {@link HighLevelStateHandler} for an explanation of high-level state IDs.
16 * @author Daniel Kirschten
18 public Object getHighLevelState();
21 * Sets the atomic high level state represented by this AtomicHighLevelStateHandler to the given value.<br>
22 * See {@link HighLevelStateHandler} for an explanation of high-level state IDs.
24 * @author Daniel Kirschten
26 public void setHighLevelState(Object newState);
28 public static class AtomicHighLevelStateHandlerParams
31 public JsonElement params;
34 public void addListener(Consumer<Object> stateChanged);
36 public void removeListener(Consumer<Object> stateChanged);