------------------Show Code ( lines)------------------
package com.todomvc.shared.command;

import java.io.Serializable;

import com.todomvc.shared.model.HasID;
1

Command acting on an object of type T.

public interface Command<T extends HasID> extends Serializable {
2

Eager commands are evaluated on the client before sending to the server. When non eager, the one sent back from the server is executed instead.

    boolean isEager();
3

Execute the command on target.

    void execute(T target);
4

Whether the command can proceed to execute on target.

    boolean canExecuteOn(T target);
5

Gets the type of command, used to determine which executor should execute the command.

    String getCommandType();
6

Gets the ID that uniquely identifies the object (which HasID) on which this command executes on.

    String getTargetId();

}