Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.pqt.cloptions
Class NumberOption  view NumberOption download NumberOption.java

java.lang.Object
  extended byorg.pqt.cloptions.Option
      extended byorg.pqt.cloptions.NumberOption

public class NumberOption
extends Option

this class implements a command line option that is followed by none or more integer numbers


Field Summary
(package private)  int max
           
(package private)  int min
           
 java.util.Vector value
          this will contain the numbers read in
 
Fields inherited from class org.pqt.cloptions.Option
longNames, read, shortNames
 
Constructor Summary
NumberOption(java.lang.String shortNames, java.lang.String longNames)
          initialize the option using the given names to read none or more numbers from the command line (the upper limit is in fact 60000)
NumberOption(java.lang.String shortNames, java.lang.String longNames, int min, int max)
          initialize the option to use the given names, and to read a minimum of min and a maximum of max numbers following the option
 
Method Summary
 void doRead(OptionProcessor op)
          read in the numbers
 
Methods inherited from class org.pqt.cloptions.Option
read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

value

public java.util.Vector value
this will contain the numbers read in


min

int min

max

int max
Constructor Detail

NumberOption

public NumberOption(java.lang.String shortNames,
                    java.lang.String longNames,
                    int min,
                    int max)
initialize the option to use the given names, and to read a minimum of min and a maximum of max numbers following the option


NumberOption

public NumberOption(java.lang.String shortNames,
                    java.lang.String longNames)
initialize the option using the given names to read none or more numbers from the command line (the upper limit is in fact 60000)

Method Detail

doRead

public void doRead(OptionProcessor op)
            throws OptionException
read in the numbers

Overrides:
doRead in class Option