bpiwowar.argparser.holders
Class BooleanHolder

java.lang.Object
  extended by bpiwowar.argparser.handlers.Handler
      extended by bpiwowar.argparser.holders.Holder<Boolean>
          extended by bpiwowar.argparser.holders.BooleanHolder
All Implemented Interfaces:
Serializable

public class BooleanHolder
extends Holder<Boolean>
implements Serializable

Wrapper class which ``holds'' a boolean value, enabling methods to return boolean values through arguments.

See Also:
Serialized Form

Constructor Summary
BooleanHolder()
          Constructs a new BooleanHolder with an initial value of false.
BooleanHolder(boolean b)
          Constructs a new BooleanHolder with a specific initial value.
 
Method Summary
 Boolean getValue()
           
 void setValue(boolean value)
           
protected  void setValue(String argument)
           
 
Methods inherited from class bpiwowar.argparser.holders.Holder
parse
 
Methods inherited from class bpiwowar.argparser.handlers.Handler
add, getLimitChecker, getLimitChecker, getRangeChecker, isHelpOption, processAnnotations, setPrefix, updateRangeChecker
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BooleanHolder

public BooleanHolder()
Constructs a new BooleanHolder with an initial value of false.


BooleanHolder

public BooleanHolder(boolean b)
Constructs a new BooleanHolder with a specific initial value.

Parameters:
b - Initial boolean value.
Method Detail

setValue

public void setValue(boolean value)
Parameters:
value - the value to set

getValue

public Boolean getValue()
Specified by:
getValue in class Holder<Boolean>
Returns:
the value

setValue

protected void setValue(String argument)
                 throws ArgParseException
Specified by:
setValue in class Holder<Boolean>
Throws:
ArgParseException


Copyright © 2013. All Rights Reserved.