ds.ov2.util
Class Value_option<E>
java.lang.Object
ds.ov2.util.Option
ds.ov2.util.Value_option<E>
public class Value_option<E>
- extends Option
Command line switch which sets a reference to a certain value.
- 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 $
Field Summary |
private Reference<E> |
ref
The reference to set. |
private E |
value
The value to store in ref when the option is found. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ref
private final Reference<E> ref
- The reference to set.
value
private final E value
- The value to store in
ref
when the option is found.
Value_option
public Value_option(String option,
Reference<E> ref,
E value,
String explanation)
- Construct a value option. When found on the
command line, the reference
ref
will be set to the
specified value.
- Parameters:
option
- the literal option string as it will appear on
the command lineref
- the referencevalue
- the value to setexplanation
- explanation for the usage information
matched
public void matched(Commandline cl)
- Called when the option is recognized. Sets the reference
ref
to the specified value value
.
- Specified by:
matched
in class Option
- Parameters:
cl
- command line instance