public class OptBoolean extends Object
Modifier and Type | Field and Description |
---|---|
static OptBoolean |
theMissingValue
Singleton instance of OptBoolean with the value not present.
|
Constructor and Description |
---|
OptBoolean(boolean value)
Constructor (value present).
|
Modifier and Type | Method and Description |
---|---|
boolean |
present()
Test if this parameter's value was present.
|
boolean |
value()
Get the boolean value of the parameter.
|
boolean |
value(boolean defaultValue)
Get the boolean value of this parameter, or a default value if the value
is absent.
|
public static final OptBoolean theMissingValue
public OptBoolean(boolean value)
value
- The value of the parameterpublic boolean value()
Error
- if the value is not present.public boolean value(boolean defaultValue)
defaultValue
- The default value for the parameter.public boolean present()
Copyright © 2017. All rights reserved.