org.echarts.util
Class GetOpt

java.lang.Object
  extended by org.echarts.util.GetOpt

public class GetOpt
extends java.lang.Object

A class to implement UNIX-style (single-character) command arguments

Version:
$Id: GetOpt.java 926 2008-04-16 01:13:09Z gwbond $
Author:
Ian F. Darwin, ian@darwinsys.com based on the standard UNIX getopt(3) program.

Field Summary
protected  boolean done
          Internal flag - whether we are done all the options
static int DONE
          Public constant for "no more options" XXX should switch to hasNext()/next() pattern.
protected  java.lang.String optarg
          The option argument, if there is one.
protected  int optind
          Where we are in the options
protected  java.lang.String pattern
          The set of characters to look for
 
Constructor Summary
GetOpt(java.lang.String patt)
           
 
Method Summary
 char getopt(java.lang.String[] argv)
          Return one argument.
 int getOptInd()
          Retrieve the option index
 java.lang.String optarg()
          Retrieve the current option argument
 void rewind()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pattern

protected java.lang.String pattern
The set of characters to look for


optind

protected int optind
Where we are in the options


DONE

public static final int DONE
Public constant for "no more options" XXX should switch to hasNext()/next() pattern.

See Also:
Constant Field Values

done

protected boolean done
Internal flag - whether we are done all the options


optarg

protected java.lang.String optarg
The option argument, if there is one.

Constructor Detail

GetOpt

public GetOpt(java.lang.String patt)
Method Detail

getOptInd

public int getOptInd()
Retrieve the option index


optarg

public java.lang.String optarg()
Retrieve the current option argument


rewind

public void rewind()

getopt

public char getopt(java.lang.String[] argv)
Return one argument.