Package commandManager.commands
Interface BaseCommand
- All Known Implementing Classes:
AddCommand,AddIfMaxCommand,AddIfMinCommand,ClearCommand,CountGreaterThanDistanceCommand,ExecuteScriptCommand,ExitCommand,HelpCommand,InfoCommand,MinByCreationDateCommand,PrintFieldDistanceAscendingCommand,RemoveByIdCommand,RemoveGreaterCommand,SaveCommand,ShowCommand,UpdateCommand
public interface BaseCommand
Base interface for command implementation. You should implement it before applying command in CommandManager
- Since:
- 1.0
- See Also:
-
Method Summary
-
Method Details
-
getName
String getName()Base method for show command name- Returns:
- command name
-
getDescr
String getDescr()Base method for show command description.- Returns:
- command description
-
getArgs
Base method for show command arguments- Returns:
- command arguments pattern
-
execute
void execute(String[] args) throws IllegalArgumentException, BuildObjectException, WrongAmountOfArgumentsException Base method for command executing.- Parameters:
args- full array of entered line.- Throws:
IllegalArgumentException- when command can't understand given argumentsBuildObjectExceptionWrongAmountOfArgumentsException
-