# Class OptionParser

java.lang.Object
com.thaiopensource.util.OptionParser

public class OptionParser extends Object

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `OptionParser.InvalidOptionException`
  `static class`
  `OptionParser.MissingArgumentException`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `OptionParser(String optionSpec, String[] args)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getOptionArg()`
  `char`
  `getOptionChar()`
  `String`
  `getOptionCharString()`
  `String[]`
  `getRemainingArgs()`
  `static void`
  `main(String[] args)`
  `boolean`
  `moveToNextOption()`

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

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

- ## Constructor Details

  - ### OptionParser

    public OptionParser(String optionSpec, String[] args)

- ## Method Details

  - ### getOptionChar

    public char getOptionChar()

  - ### getOptionCharString

    public String getOptionCharString()

  - ### getOptionArg

    public String getOptionArg()

  - ### moveToNextOption

    public boolean moveToNextOption() throws OptionParser.InvalidOptionException, OptionParser.MissingArgumentException
    Throws:
      `OptionParser.InvalidOptionException`
      `OptionParser.MissingArgumentException`

  - ### getRemainingArgs

    public String[] getRemainingArgs()

  - ### main

    public static void main(String[] args)