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.basex.util
Class GetOpts

    java.lang.Object
      org.basex.util.GetOpts

    public final class GetOpts

extends java.lang.Object

This class splits the input String into its arguments and checks if there is a path expression.

Version:
  0.1
Author:
  Workgroup DBIS, University of Konstanz 2005-08, ISC License, Hannes Schwarz - Hannes.Schwarz@gmail.com

Constructor Summary
`GetOpts(java.lang.String arguments, java.lang.String options)` Construct a basic Getopt instance with the given input data.

Method Summary
`StringList` | `getFoundArgs()` getFoundArgs is used to return all parsed arguments like source_file target_file.
`int` | `getopt()` This method checks the string passed from the command line.
`java.lang.String` | `getOptarg()` For communication to the caller.
`java.lang.String` | `getPath()` getPath is used to store a path expression.
`boolean` | `more()` Checks if more options can be returned.
`int` | `next()` Returns the next option.

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

Constructor Detail

### GetOpts

    public GetOpts(java.lang.String arguments,
                   java.lang.String options)

  Construct a basic Getopt instance with the given input data.

  Parameters:
    `arguments` - The String passed from the command line
    `options` - A String containing a description of the valid options

Method Detail

### getOptarg

    public java.lang.String getOptarg()

  For communication to the caller. No set method is provided because setting this variable has no effect.

  Returns:
    When an option is found it is stored in optarg and returned here.

### getFoundArgs

    public StringList getFoundArgs()

  getFoundArgs is used to return all parsed arguments like source_file target_file.

  Returns:
    all parsed arguments

### getPath

    public java.lang.String getPath()

  getPath is used to store a path expression.

  Returns:
    path to go

### more

    public boolean more()

  Checks if more options can be returned.

  Returns:
    result of check

### next

    public int next()

  Returns the next option.

  Returns:
    next option

### getopt

    public int getopt()

  This method checks the string passed from the command line. If an option is found it returns it and store possible arguments in optarg. If an invalid option is found, 0 is returned and an error thrown. If there is no more to be checked -1 will be returned.

  Returns:
    see above

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