package testcode.actions; import org.eclipse.jdt.annotation.NonNull; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeInfo.As; import com.fasterxml.jackson.annotation.JsonTypeInfo.Id; /** * An action represents a "promise" made by a participant in the negotiation. It * can not be retracted and is immutable. But it can be followed by other * actions that override it or make it outdated. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = As.WRAPPER_OBJECT) @JsonSubTypes({ @JsonSubTypes.Type(value = EndNegotiation.class), @JsonSubTypes.Type(value = Accept.class) }) public interface Action { /** * * @return the {@link Id} of the actor of this action. */ @NonNull PartyId getActor(); }