org.apache.ode.utils.cli

## Class LastArgument

- java.lang.Object
- - org.apache.ode.utils.cli.Argument
  - - org.apache.ode.utils.cli.LastArgument

- All Implemented Interfaces:
    CommandlineFragment

      public class LastArgument
      extends Argument

  A fragment implementation that picks-off the last argument on the line early. For example, this would be a way to grab the destination directory of a UNIX `mv` command.

- - ### Field Summary

    - ### Fields inherited from interface org.apache.ode.utils.cli.CommandlineFragment

      `COMMAND_PREFIX`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LastArgument(java.lang.String argName, java.lang.String description, boolean optional)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.List<java.lang.String>` | `consume(java.util.List<java.lang.String> s)` Grab the pieces of the commandline relevant to this argument, configure the implementation, and then return a new array of arguments that will have the pieces of the original commandline that this command used removed.

    - ### Methods inherited from class org.apache.ode.utils.cli.Argument

      `getDescription, getUsage, getValue, isOptional, isSet, reset`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### LastArgument

          public LastArgument(java.lang.String argName,
                      java.lang.String description,
                      boolean optional)

  - ### Method Detail

    - #### consume

          public java.util.List<java.lang.String> consume(java.util.List<java.lang.String> s)
                                                   throws CommandlineSyntaxException

      Description copied from interface: `CommandlineFragment`

      Grab the pieces of the commandline relevant to this argument, configure the implementation, and then return a new array of arguments that will have the pieces of the original commandline that this command used removed.

      Specified by:
        `consume` in interface `CommandlineFragment`
      Overrides:
        `consume` in class `Argument`
      Parameters:
        `s` - the list of arguments
      Returns:
        the list of arguments, post parse
      Throws:
        `CommandlineSyntaxException` - if the commandline is structurally invalid.