com.micheldalal.x10.test
Class X10Test.PortArgumentCommand

java.lang.Object
  extended bycom.micheldalal.x10.test.X10Test.PortArgumentCommand
All Implemented Interfaces:
com.nevelex.app.args.ArgumentCommand
Enclosing class:
X10Test

class X10Test.PortArgumentCommand
extends java.lang.Object
implements com.nevelex.app.args.ArgumentCommand

Command pattern class implementing the Port Argument.


Constructor Summary
(package private) X10Test.PortArgumentCommand()
           
 
Method Summary
 int consumeArgument(java.lang.String[] args, int offset)
          Consumes the current command-line argument.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

X10Test.PortArgumentCommand

X10Test.PortArgumentCommand()
Method Detail

consumeArgument

public int consumeArgument(java.lang.String[] args,
                           int offset)
                    throws com.nevelex.app.args.InvalidArgumentException
Consumes the current command-line argument. The element in the args array at the offset will be the argument itself. This method is the equivalent of the execute method in most command interfaces in the command pattern.

Specified by:
consumeArgument in interface com.nevelex.app.args.ArgumentCommand
Parameters:
args - the command line argument array.
offset - the offset in to the command line argument array where the argument exists.
Returns:
the offset for the next argument in the command.
Throws:
com.nevelex.app.args.InvalidArgumentException - thrown if the argument does not have all of its required options.