ds.ov2.util
Class Bool_option
java.lang.Object
ds.ov2.util.Option
ds.ov2.util.Bool_option
public class Bool_option
- extends Option
Boolean command line switch that sets a boolean Reference
to
true if found on the command line.
- CPP Preprocessing
- no cpp preprocessing needed
- Execution Environment:
- host
- Author:
- Hendrik Tews
- Version:
- $Revision: 1.1 $
- Last Commit:
- $Date: 2009-06-02 09:56:03 $ by $Author: tews $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ref
private Reference<Boolean> ref
- Reference to set to true when the option occured.
Bool_option
public Bool_option(String option,
Reference<Boolean> ref,
String explanation)
- Construct a simple command line switch. When found on the
command line, the reference
ref
will be set to
true.
- Parameters:
option
- the literal option string as it will appear on
the command lineref
- the reference to be switched to trueexplanation
- explanation for the usage information
matched
public void matched(Commandline cl)
- Called when the option is recognized. Sets the boolean
reference
ref
to true.
- Specified by:
matched
in class Option
- Parameters:
cl
- command line instance