ds.ov2.util
Class BigInt_hex_input_option

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

public class BigInt_hex_input_option
extends Option

Command line option with a hex BigInteger argument which is to be recoreded in a BigInteger_inputs instance. The BigInteger argument may contain arbitraily many dots. They are removed before converting the string into a BigInteger.

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_hex_input_option(String option, BigInteger_inputs inputs, String argument, String explanation)
          Construct a hex BigInteger input option.
 
Method Summary
 BigInteger get_hex_bigint_argument(Commandline cl)
          Parse a hexadecimal 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_hex_input_option

public BigInt_hex_input_option(String option,
                               BigInteger_inputs inputs,
                               String argument,
                               String explanation)
Construct a hex BigInteger input option. When found on the command line, the next command line element will be taken as a base 16 BigInteger and added to inputs. This BigInteger argument may contain arbitraily many dots.

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_hex_bigint_argument

public BigInteger get_hex_bigint_argument(Commandline cl)
Parse a hexadecimal 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 16 BigInteger (after erasing all dots) and stores it in the vector of BigInteger inputs inputs.

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