cc.mallet.util
Class CommandOption.List

java.lang.Object
  extended by cc.mallet.util.CommandOption.List
Enclosing class:
CommandOption

public static class CommandOption.List
extends java.lang.Object


Constructor Summary
CommandOption.List(java.lang.String summary, CommandOption[] options)
           
 
Method Summary
 void add(java.lang.Class owner)
           
 void add(CommandOption.List opts)
           
 void add(CommandOption opt)
           
 void add(CommandOption[] opts)
           
 CommandOption getCommandOption(int index)
           
 void logOptions(java.util.logging.Logger logger)
           
 void printUsage(boolean printLongDoc)
           
 java.lang.String[] process(java.lang.String[] args)
          Parse and process command-line options in args.
 int processOptions(java.lang.String[] args)
           
 void readFromFile(java.io.File configurationFile)
          Load configuration information from a file.
 void setSummary(java.lang.String s)
           
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandOption.List

public CommandOption.List(java.lang.String summary,
                          CommandOption[] options)
Method Detail

setSummary

public void setSummary(java.lang.String s)

size

public int size()

getCommandOption

public CommandOption getCommandOption(int index)

add

public void add(CommandOption opt)

add

public void add(CommandOption[] opts)

add

public void add(CommandOption.List opts)

add

public void add(java.lang.Class owner)

readFromFile

public void readFromFile(java.io.File configurationFile)
Load configuration information from a file. If the filename ends with ".xml", the file is interpreted as a Java XML configuration file. Otherwise it is interpreted as a text config file (eg "key = value" on each line). Note that text files can only use Latin 1 (en-us) characters, while XML files can be UTF-8.


process

public java.lang.String[] process(java.lang.String[] args)
Parse and process command-line options in args. Return sub-array of args occurring after first non-recognized arg that doesn't begin with a dash.


processOptions

public int processOptions(java.lang.String[] args)

printUsage

public void printUsage(boolean printLongDoc)

logOptions

public void logOptions(java.util.logging.Logger logger)