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

Quick Search    Search Deep

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

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

public class BooleanOption
extends Option

this class implements a command line option that is followed by a + or a - indicating the option is set or unset. If no +/- follows then the options is set


Field Summary
 boolean value
          true if the option is set, false otherwise
 
Fields inherited from class org.pqt.cloptions.Option
longNames, read, shortNames
 
Constructor Summary
BooleanOption(java.lang.String shortNames, java.lang.String longNames)
          initialize to false
BooleanOption(java.lang.String shortNames, java.lang.String longNames, boolean initialVal)
          initialize with the given initial value
 
Method Summary
 void doRead(OptionProcessor op)
          read in the arguments for this option - this routine should be overridden in subclasses
 
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 boolean value
true if the option is set, false otherwise

Constructor Detail

BooleanOption

public BooleanOption(java.lang.String shortNames,
                     java.lang.String longNames,
                     boolean initialVal)
initialize with the given initial value


BooleanOption

public BooleanOption(java.lang.String shortNames,
                     java.lang.String longNames)
initialize to false

Method Detail

doRead

public void doRead(OptionProcessor op)
Description copied from class: Option
read in the arguments for this option - this routine should be overridden in subclasses

Overrides:
doRead in class Option