helix.graph.util
Class CommandLine

java.lang.Object
  extended by helix.graph.util.CommandLine
Direct Known Subclasses:
C3PartOptions

public class CommandLine
extends Object


Constructor Summary
CommandLine(String[] args)
          constructor
 
Method Summary
 thirdparty.ostermiller.util.CmdLnOption addOption(String longName, Character shortName)
          add option
static String boolToString(boolean b)
          helper function to parse arguments values boolean -> String "on" "off"
 thirdparty.ostermiller.util.CmdLn getCommand()
          get internal com.Ostermiller.util.CmdLn
 List<String> getNonOptionArguments()
          get remaining arguments after all options have been removed
 thirdparty.ostermiller.util.CmdLnOption getOption(String longName)
          get registered option
 String getUsage()
          get usage description
 boolean isSetByUser(String name)
          tell if option has been set by user
 void parse()
          parse command line
 void set_help(List<String> args)
          default stub for help invocation
 void setUsage(String usage)
          set usage description
static boolean stringToBool(String s)
           
static int stringToInt(String s, int infiniteValue)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandLine

public CommandLine(String[] args)
constructor

Method Detail

setUsage

public void setUsage(String usage)
set usage description


getUsage

public String getUsage()
get usage description


getCommand

public thirdparty.ostermiller.util.CmdLn getCommand()
get internal com.Ostermiller.util.CmdLn


addOption

public thirdparty.ostermiller.util.CmdLnOption addOption(String longName,
                                                         Character shortName)
add option


getOption

public thirdparty.ostermiller.util.CmdLnOption getOption(String longName)
get registered option


parse

public void parse()
           throws CommandLineException
parse command line

Throws:
CommandLineException

getNonOptionArguments

public List<String> getNonOptionArguments()
get remaining arguments after all options have been removed


isSetByUser

public boolean isSetByUser(String name)
tell if option has been set by user


set_help

public void set_help(List<String> args)
default stub for help invocation


boolToString

public static String boolToString(boolean b)
helper function to parse arguments values boolean -> String "on" "off"


stringToBool

public static boolean stringToBool(String s)

stringToInt

public static int stringToInt(String s,
                              int infiniteValue)