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

## avrora.util
Class Options

    java.lang.Object
      avrora.util.Options

public class Options
extends java.lang.Object

The `Options` class represents a collection of command line options and utility methods for parsing the command line. Very useful for getting cheap and powerful parsing of command line options.

Field Summary
`protected java.lang.String[]` | `arguments`
`protected java.lang.String` | `firstUnknownOption`
`protected java.util.HashMap` | `knownValues`
`protected java.util.HashMap` | `unknownValues`

Constructor Summary
`Options()`

Method Summary
`java.util.Collection` | `getAllOptions()`
`java.lang.String[]` | `getArguments()`
`java.lang.String` | `getFirstUnknownOption()`
`Option` | `getOption(java.lang.String name)`
`java.lang.String` | `getOptionValue(java.lang.String name)`
`boolean` | `hasOption(java.lang.String name)`
`Option.Bool` | `newOption(java.lang.String name, boolean val, java.lang.String desc)`
`Option.Double` | `newOption(java.lang.String name, double val, java.lang.String desc)`
`Option.Interval` | `newOption(java.lang.String name, long l, long h, java.lang.String desc)`
`Option.Long` | `newOption(java.lang.String name, long val, java.lang.String desc)`
`Option.Str` | `newOption(java.lang.String name, java.lang.String val, java.lang.String desc)`
`Option.List` | `newOptionList(java.lang.String name, java.lang.String val, java.lang.String desc)`
`void` | `parseCommandLine(java.lang.String[] args)`
`protected void` | `parseOption(java.lang.String opt)`
`void` | `process(Options o)`
`void` | `process(java.util.Properties p)`
`int` | `size()`
`boolean` | `unknownOptions()`

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

Field Detail

### knownValues

    protected final java.util.HashMap knownValues

### unknownValues

    protected final java.util.HashMap unknownValues

### firstUnknownOption

    protected java.lang.String firstUnknownOption

### arguments

    protected java.lang.String[] arguments

Constructor Detail

### Options

    public Options()

Method Detail

### newOption

    public Option.Bool newOption(java.lang.String name,
                                 boolean val,
                                 java.lang.String desc)

### newOption

    public Option.Str newOption(java.lang.String name,
                                java.lang.String val,
                                java.lang.String desc)

### newOptionList

    public Option.List newOptionList(java.lang.String name,
                                     java.lang.String val,
                                     java.lang.String desc)

### newOption

    public Option.Long newOption(java.lang.String name,
                                 long val,
                                 java.lang.String desc)

### newOption

    public Option.Double newOption(java.lang.String name,
                                   double val,
                                   java.lang.String desc)

### newOption

    public Option.Interval newOption(java.lang.String name,
                                     long l,
                                     long h,
                                     java.lang.String desc)

### getOptionValue

    public java.lang.String getOptionValue(java.lang.String name)

### getOption

    public Option getOption(java.lang.String name)

### hasOption

    public boolean hasOption(java.lang.String name)

### getArguments

    public java.lang.String[] getArguments()

### unknownOptions

    public boolean unknownOptions()

### getFirstUnknownOption

    public java.lang.String getFirstUnknownOption()

### parseCommandLine

    public void parseCommandLine(java.lang.String[] args)

### parseOption

    protected void parseOption(java.lang.String opt)

### getAllOptions

    public java.util.Collection getAllOptions()

### process

    public void process(Options o)

### process

    public void process(java.util.Properties p)

### size

    public int size()

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