ds.ov2.util
Class Bool_int_option
java.lang.Object
ds.ov2.util.Option
ds.ov2.util.Int_option
ds.ov2.util.Bool_int_option
public class Bool_int_option
- extends Int_option
Int_option
that additionally sets a boolean reference to
true.
- 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 |
bool_ref
private Reference<Boolean> bool_ref
- The boolean reference.
Bool_int_option
public Bool_int_option(String option,
Reference<Boolean> bool_ref,
Reference<Integer> int_ref,
String argument,
String explanation)
- Construct an bool-integer option. When found on the command
line, the boolean reference will be set to true and the int
reference will be set to the value of the next command line
element.
- Parameters:
option
- the literal option string as it will appear on
the command linebool_ref
- the boolean referenceint_ref
- the int referenceargument
- name of the argument for the explanationexplanation
- explanation for the usage information
matched
public void matched(Commandline cl)
- Called when the option is recognized. Converts the next command
line element to an integer and puts it into the int reference.
Additionally set the boolean reference to true.
Prints an error and exits the program on any problem.
- Overrides:
matched
in class Int_option
- Parameters:
cl
- command line instance