com.micheldalal.x10.test
Class X10Test.UnitIDArgumentCommand

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

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

Used to specify the unit id.


Constructor Summary
(package private) X10Test.UnitIDArgumentCommand()
           
 
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.UnitIDArgumentCommand

X10Test.UnitIDArgumentCommand()
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.