@@ -0,0 +1,2114 @@
+/**%0A * %0A */%0Apackage mathsquared.resultswizard2;%0A%0Aimport java.util.LinkedHashMap;%0Aimport java.util.Map;%0A%0A/**%0A * A simple, immutable implementation of %7B@link Command%7D.%0A * %0A * @author MathSquared%0A * %0A */%0Apublic class SimpleCommand implements Command %7B%0A    private Message type;%0A    private String str;%0A    private LinkedHashMap%3CString, SlideList%3E mss;%0A%0A    /**%0A     * Constructs a new SimpleCommand with the given message type, string payload, and Map&lt;String, %7B@link SlideList%7D%3E payload.%0A     * %0A     * %3Cp%3E%0A     * Note that none of the constructors of this class check whether the payload given is %7B@linkplain Message#getParamType() supported%7D by the Message. Any superfluous payload will be ignored.%0A     * %3C/p%3E%0A     * %0A     * %3Cp%3E%0A     * The iteration order of %3Ccode%3Emss%3C/code%3E is retained; any maps returned from %7B@link #getStringSlideListPayload()%7D will have the same iteration order as %3Ccode%3Emss%3C/code%3E.%0A     * %3C/p%3E%0A     * %0A     * @param type the Message type represented by this Command%0A     * @param str the String payload of the Command%0A     * @param mss the Map%3CString, SlideList%3E payload of the Command; note that while no references to the %3Ccode%3Emss%3C/code%3E parameter are retained outside the constructor, the SlideLists are not cloned%0A     */%0A    public SimpleCommand (Message type, String str, Map%3CString, SlideList%3E mss) %7B%0A        this.type = type;%0A        this.str = str;%0A        this.mss = new LinkedHashMap%3CString, SlideList%3E(mss);%0A    %7D%0A%0A    public Message getType () %7B%0A        return type;%0A    %7D%0A%0A    public String getStringPayload () %7B%0A        if (type.getParamType().equals(ParamType.STRING)) %7B%0A            return str;%0A        %7D else %7B%0A            throw new UnsupportedOperationException(%22Message type %22 + type + %22 does not carry a String payload%22);%0A        %7D%0A    %7D%0A%0A    public Map%3CString, SlideList%3E getStringSlideListPayload () %7B%0A        if (type.getParamType().equals(ParamType.MAP_STRING_SLIDELIST)) %7B%0A            return mss;%0A        %7D else %7B%0A            throw new UnsupportedOperationException(%22Message type %22 + type + %22 does not carry a Map%3CString, SlideList%3E payload%22);%0A        %7D%0A    %7D%0A%7D%0A

Add SimpleCommand (long overdue)