Class Options

java.lang.Object
  extended by Options

public class Options
extends java.lang.Object

Parsing of command line options

Author:
Guy Lapalme, Université de Montréal, 2012

Field Summary
static java.util.Map<java.lang.String,java.lang.String> allowedSO
           
static boolean glosses
           
private static java.lang.String moreHelp
           
static boolean offset
           
static boolean overview
           
static java.util.List<java.lang.String> searchOptions
           
static java.lang.String searchstr
           
static java.util.regex.Pattern soRE
           
private static java.lang.String usageStr
          display of usage of the program with the list of possible command line arguments
 
Constructor Summary
Options()
           
 
Method Summary
static void main(java.lang.String[] args)
          Some simple unit tests of the functions of this class
protected static void parseArgs(java.lang.String s)
          Simulate programs arguments from a single string...
protected static void parseArgs(java.lang.String[] args)
          Parse program arguments and set appropriate options will stop on -h : prints usage of the program
private static void usage()
          Prints a short help about the use of the program called with the -h program argument
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

searchstr

public static java.lang.String searchstr

glosses

public static boolean glosses

offset

public static boolean offset

overview

public static boolean overview

searchOptions

public static java.util.List<java.lang.String> searchOptions

allowedSO

public static java.util.Map<java.lang.String,java.lang.String> allowedSO

soRE

public static java.util.regex.Pattern soRE

usageStr

private static java.lang.String usageStr
display of usage of the program with the list of possible command line arguments


moreHelp

private static java.lang.String moreHelp
Constructor Detail

Options

public Options()
Method Detail

parseArgs

protected static void parseArgs(java.lang.String s)
Simulate programs arguments from a single string... calls parseArgs(String[] args)

Parameters:
s -

parseArgs

protected static void parseArgs(java.lang.String[] args)
Parse program arguments and set appropriate options will stop on -h : prints usage of the program

Parameters:
args - String array as given to the main program

usage

private static void usage()
Prints a short help about the use of the program called with the -h program argument


main

public static void main(java.lang.String[] args)
Some simple unit tests of the functions of this class

Parameters:
args -