com.jeantessier.commandline
Class CommandLineSwitchBase

java.lang.Object
  |
  +--com.jeantessier.commandline.CommandLineSwitchBase
All Implemented Interfaces:
CommandLineSwitch, Visitable
Direct Known Subclasses:
MultipleValuesSwitch, OptionalValueSwitch, SingleValueSwitch, ToggleSwitch

public abstract class CommandLineSwitchBase
extends java.lang.Object
implements CommandLineSwitch

Base class for implenting the CommandLineSwitch interface.


Field Summary
protected  java.lang.Object value
           
 
Constructor Summary
CommandLineSwitchBase()
           
CommandLineSwitchBase(boolean mandatory)
           
CommandLineSwitchBase(java.lang.Object default_value)
           
CommandLineSwitchBase(java.lang.Object default_value, boolean mandatory)
           
 
Method Summary
 java.lang.Object DefaultValue()
           
 boolean Mandatory()
           
 boolean Present()
           
protected  void Present(boolean present)
           
 java.lang.String toString()
           
 java.lang.Object Value()
           
 void Value(java.lang.Object new_value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.jeantessier.commandline.CommandLineSwitch
Parse
 
Methods inherited from interface com.jeantessier.commandline.Visitable
Accept
 

Field Detail

value

protected java.lang.Object value
Constructor Detail

CommandLineSwitchBase

public CommandLineSwitchBase()

CommandLineSwitchBase

public CommandLineSwitchBase(java.lang.Object default_value)

CommandLineSwitchBase

public CommandLineSwitchBase(boolean mandatory)

CommandLineSwitchBase

public CommandLineSwitchBase(java.lang.Object default_value,
                             boolean mandatory)
Method Detail

DefaultValue

public java.lang.Object DefaultValue()
Specified by:
DefaultValue in interface CommandLineSwitch

Value

public java.lang.Object Value()
Specified by:
Value in interface CommandLineSwitch

Value

public void Value(java.lang.Object new_value)
Specified by:
Value in interface CommandLineSwitch

Present

public boolean Present()
Specified by:
Present in interface CommandLineSwitch

Present

protected void Present(boolean present)

Mandatory

public boolean Mandatory()
Specified by:
Mandatory in interface CommandLineSwitch

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object