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 defaultValue)
           
CommandLineSwitchBase(java.lang.Object defaultValue, boolean mandatory)
           
 
Method Summary
 java.lang.Object getDefaultValue()
           
 java.lang.Object getValue()
           
 boolean isMandatory()
           
 boolean isPresent()
           
protected  void isPresent(boolean present)
           
 void setValue(java.lang.Object value)
           
 java.lang.String toString()
           
 
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 defaultValue)

CommandLineSwitchBase

public CommandLineSwitchBase(boolean mandatory)

CommandLineSwitchBase

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

getDefaultValue

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

getValue

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

setValue

public void setValue(java.lang.Object value)
Specified by:
setValue in interface CommandLineSwitch

isPresent

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

isPresent

protected void isPresent(boolean present)

isMandatory

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

toString

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


Dependency Finder 1.1.0 © 2001-2004 Jean Tessier.