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 TypeMethodDescriptionboolean
checkArgument
(Object inputArgument) Overrides the method checkArgument(Object inputArgument) in the Command class.void
execute()
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:Command
Base method for show command name- Specified by:
getName
in interfaceCommandInterface
- Specified by:
getName
in classCommand
- Returns:
- command name
-
getDescr
Description copied from class:Command
Base method for show command description.- Specified by:
getDescr
in interfaceCommandInterface
- Specified by:
getDescr
in 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:
execute
in interfaceCommandInterface
- Specified by:
execute
in classCommand
-
checkArgument
Overrides the method checkArgument(Object inputArgument) in the Command class. Checks if the argument is null.- Specified by:
checkArgument
in interfaceCommandInterface
- Specified by:
checkArgument
in classCommand
- Parameters:
inputArgument
- the argument to be checked.- Returns:
- true if the argument is null, false if not.
-