CommandFormat (Hadoop 0.20.1+169.88 API)
Date: 2010-05-20

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.hadoop.fs.shell
Class CommandFormat

    java.lang.Object
      org.apache.hadoop.fs.shell.CommandFormat

    public class CommandFormat

extends Object

Parse the args of a command and check the format of args.

Constructor Summary
`CommandFormat(String n, int min, int max, String... possibleOpt)` constructor

Method Summary
`boolean` | `getOpt(String option)` Return if the option is set or not
`List<String>` | `parse(String[] args, int pos)` Parse parameters starting from the given position

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CommandFormat

    public CommandFormat(String n,
                         int min,
                         int max,
                         String... possibleOpt)

  constructor

Method Detail

### parse

    public List<String> parse(String[] args,
                              int pos)

  Parse parameters starting from the given position

  Parameters:
    `args` - an array of input arguments
    `pos` - the position at which starts to parse
  Returns:
    a list of parameters

### getOpt

    public boolean getOpt(String option)

  Return if the option is set or not

  Parameters:
    `option` - String representation of an option
  Returns:
    true is the option is set; false otherwise

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation