com.jeantessier.commandline
Class SingleValueSwitch

java.lang.Object
  |
  +--com.jeantessier.commandline.CommandLineSwitchBase
        |
        +--com.jeantessier.commandline.SingleValueSwitch
All Implemented Interfaces:
CommandLineSwitch, Visitable

public class SingleValueSwitch
extends CommandLineSwitchBase

The switch must be followed by a value. It can only appear once on the command-line.


Fields inherited from class com.jeantessier.commandline.CommandLineSwitchBase
value
 
Constructor Summary
SingleValueSwitch()
           
SingleValueSwitch(boolean mandatory)
           
SingleValueSwitch(java.lang.String defaultValue)
           
SingleValueSwitch(java.lang.String defaultValue, boolean mandatory)
           
 
Method Summary
 void accept(Visitor visitor)
           
 int parse(java.lang.String name, java.lang.String value)
           
 
Methods inherited from class com.jeantessier.commandline.CommandLineSwitchBase
getDefaultValue, getValue, isMandatory, isPresent, isPresent, setValue, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SingleValueSwitch

public SingleValueSwitch()

SingleValueSwitch

public SingleValueSwitch(java.lang.String defaultValue)

SingleValueSwitch

public SingleValueSwitch(boolean mandatory)

SingleValueSwitch

public SingleValueSwitch(java.lang.String defaultValue,
                         boolean mandatory)
Method Detail

parse

public int parse(java.lang.String name,
                 java.lang.String value)
          throws CommandLineException

accept

public void accept(Visitor visitor)


Dependency Finder 1.1.0 © 2001-2004 Jean Tessier.