Rabbit Escape  2017-01-14_18:33:47_+0000__(tag:_v0.10.1)
Classes | Public Member Functions | Public Attributes | Private Attributes | List of all members
rabbitescape.engine.util.CommandLineOption Class Reference

Classes

class  OptionDoesNotTakeParameter
 
class  OptionRequiresParameter
 
class  UnknownOption
 

Public Member Functions

 CommandLineOption (String longForm, boolean takesParam)
 
void setValue (String value, String parentOption)
 
String getValue ()
 
void setPresent ()
 
boolean isPresent ()
 
boolean matches (String arg)
 
OptionRequiresParameter getOptionRequiresParameter (String arg)
 
UnknownOption getUnknownOption (String arg)
 
int getInt ()
 

Public Attributes

final String longForm
 
final String shortForm
 
final boolean takesParam
 

Private Attributes

String value = null
 
boolean present = false
 

Detailed Description

Supply a long form option (eg "--start"). The short form is generated automatically (eg "-s"). Parameters may be supplied as the next arg, or concatenated ( "-s 0", "-s0"). Also with equals is fine (eg –start=0). Limitations;

Constructor & Destructor Documentation

rabbitescape.engine.util.CommandLineOption.CommandLineOption ( String  longForm,
boolean  takesParam 
)

Member Function Documentation

int rabbitescape.engine.util.CommandLineOption.getInt ( )
OptionRequiresParameter rabbitescape.engine.util.CommandLineOption.getOptionRequiresParameter ( String  arg)
UnknownOption rabbitescape.engine.util.CommandLineOption.getUnknownOption ( String  arg)
String rabbitescape.engine.util.CommandLineOption.getValue ( )
boolean rabbitescape.engine.util.CommandLineOption.isPresent ( )
boolean rabbitescape.engine.util.CommandLineOption.matches ( String  arg)

Checks if the command line argument is a match for this one. Also tests for concatenated param.

void rabbitescape.engine.util.CommandLineOption.setPresent ( )
void rabbitescape.engine.util.CommandLineOption.setValue ( String  value,
String  parentOption 
)

Member Data Documentation

final String rabbitescape.engine.util.CommandLineOption.longForm
boolean rabbitescape.engine.util.CommandLineOption.present = false
private
final String rabbitescape.engine.util.CommandLineOption.shortForm
final boolean rabbitescape.engine.util.CommandLineOption.takesParam
String rabbitescape.engine.util.CommandLineOption.value = null
private

The documentation for this class was generated from the following file: