Package commandManagers.commands
Class PrintFieldDescendingMetersAboveSeaLevel
java.lang.Object
commandManagers.Command
commandManagers.commands.PrintFieldDescendingMetersAboveSeaLevel
- All Implemented Interfaces:
CommandInterface
Class PrintFieldDescendingMetersAboveSeaLevel provides output of the meters above sea level in descending order.
Extends the Command class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckArgument(Object inputArgument) Overrides the method checkArgument(Object inputArgument) in the Command class.voidexecute()Overrides the method execute() in the Command class.getDescr()Base method for show command description.getName()Base method for show command nameMethods inherited from class commandManagers.Command
getArgument, isHasArgument, setArgument
-
Constructor Details
-
PrintFieldDescendingMetersAboveSeaLevel
public PrintFieldDescendingMetersAboveSeaLevel()
-
-
Method Details
-
getName
Description copied from class:CommandBase method for show command name- Specified by:
getNamein interfaceCommandInterface- Specified by:
getNamein classCommand- Returns:
- command name
-
getDescr
Description copied from class:CommandBase method for show command description.- Specified by:
getDescrin interfaceCommandInterface- Specified by:
getDescrin classCommand- Returns:
- command description
-
execute
public void execute()Overrides the method execute() in the Command class. Prints the meters above sea level in descending order. Checks the argument before execution.- Specified by:
executein interfaceCommandInterface- Specified by:
executein classCommand
-
checkArgument
Overrides the method checkArgument(Object inputArgument) in the Command class. Checks if the argument is null.- Specified by:
checkArgumentin interfaceCommandInterface- Specified by:
checkArgumentin classCommand- Parameters:
inputArgument- the argument to be checked.- Returns:
- true if the argument is null, false if not.
-