Skip to content

Commit

Permalink
Merge pull request #727 from csmith/master
Browse files Browse the repository at this point in the history
Make Command an interface
  • Loading branch information
greboid committed Dec 30, 2016
2 parents a9a31ed + f4784c4 commit 35e370f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Expand Up @@ -36,7 +36,7 @@
/**
* Represents a generic command.
*/
public abstract class BaseCommand extends Command {
public abstract class BaseCommand implements Command {

/** The controller this command is associated with. */
private final CommandController controller;
Expand Down
10 changes: 3 additions & 7 deletions src/main/java/com/dmdirc/commandparser/commands/Command.java
Expand Up @@ -29,21 +29,17 @@
import javax.annotation.Nonnull;

/**
* @deprecated Use {@link BaseCommand} directly.
* A command responds to user-input in a text field.
*/
@Deprecated
public abstract class Command {
public interface Command {

/**
* Executes this command.
*
* @param origin The container which received the command
* @param args Arguments passed to this command
* @param context The context the command was executed in
*
* @since 0.6.4
*/
public abstract void execute(@Nonnull WindowModel origin, CommandArguments args,
CommandContext context);
void execute(@Nonnull WindowModel origin, CommandArguments args, CommandContext context);

}

0 comments on commit 35e370f

Please sign in to comment.