ikrs.util
Class DefaultCommand

java.lang.Object
  extended by ikrs.util.AbstractCommand
      extended by ikrs.util.DefaultCommand
All Implemented Interfaces:
Command, java.lang.Comparable<Command>
Direct Known Subclasses:
ModuleCommand, YuccaCommand

public class DefaultCommand
extends AbstractCommand
implements Command, java.lang.Comparable<Command>


Constructor Summary
DefaultCommand(java.lang.String name, BasicType[] params)
           
 
Method Summary
 int compareTo(Command c)
           
 int execute()
          This is the final execution method - it does nothing but returning 1.
 
Methods inherited from class ikrs.util.AbstractCommand
getName, getParamAt, getParamCount, setName, setParams, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ikrs.util.Command
getName, getParamAt, getParamCount, toString
 

Constructor Detail

DefaultCommand

public DefaultCommand(java.lang.String name,
                      BasicType[] params)
Method Detail

execute

public int execute()
This is the final execution method - it does nothing but returning 1. Note that this method does _not_ throw any exceptions! Its up to a stored internal command handler to handle exceptions.

Specified by:
execute in interface Command
Specified by:
execute in class AbstractCommand
Returns:
a return code that indicates the execution result. It depends on the context what the exact meaning of the return code is, but usually the value 0 (zero) implies success.

compareTo

public int compareTo(Command c)
Specified by:
compareTo in interface java.lang.Comparable<Command>