ds.ov2.util
Class BigInt_input_option

java.lang.Object
  extended by ds.ov2.util.Option
      extended by ds.ov2.util.BigInt_input_option

public class BigInt_input_option
extends Option

Command line option with a BigInteger argument which is to be recoreded in a BigInteger_inputs instance.

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  BigInteger_inputs inputs
          The vector with the BigInteger inputs.
 
Fields inherited from class ds.ov2.util.Option
argument, explanation, option
 
Constructor Summary
BigInt_input_option(String option, BigInteger_inputs inputs, String argument, String explanation)
          Construct an BigInteger input option.
 
Method Summary
 BigInteger get_bigint_argument(Commandline cl)
          Parse a BigInteger argument from the command line.
 void matched(Commandline cl)
          Called when this option has been recognized on the command line.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

inputs

private final BigInteger_inputs inputs
The vector with the BigInteger inputs.

Constructor Detail

BigInt_input_option

public BigInt_input_option(String option,
                           BigInteger_inputs inputs,
                           String argument,
                           String explanation)
Construct an BigInteger input option. When found on the command line, the next command line element will be taken as a base 10 BigInteger and added to inputs.

Parameters:
option - the literal option string as it will appear on the command line
inputs - the input collection
argument - name of the argument for the explanation
explanation - explanation for the usage information
Method Detail

get_bigint_argument

public BigInteger get_bigint_argument(Commandline cl)
Parse a BigInteger argument from the command line. Tries to convert the next unprocessed command line element to a BigInteger. Displays an error message and terminates the application if there is no next command line element or if it cannot be converted.

Parameters:
cl - command line instance
Returns:
next unprocessed option converted to BigInteger if possible

matched

public void matched(Commandline cl)
Called when this option has been recognized on the command line. Retrives the next command line argument, interprets it as a base 10 BigInteger and stores it in the vector of BigInteger inputs inputs.

Specified by:
matched in class Option
Parameters:
cl - command line instance