public class BooleanConfOption extends AbstractConfOption
Constructor and Description |
---|
BooleanConfOption(String key,
boolean defaultValue,
String description)
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
get(org.apache.hadoop.conf.Configuration conf)
Lookup value in Configuration
|
boolean |
getDefaultValue()
Get the default value of this option
|
String |
getDefaultValueStr()
Get string representation of default value
|
ConfOptionType |
getType()
Get type this option holds
|
boolean |
isDefaultValue(org.apache.hadoop.conf.Configuration conf)
Check if the value set is the same as the default value
|
boolean |
isFalse(org.apache.hadoop.conf.Configuration conf)
Check if value is true
|
boolean |
isTrue(org.apache.hadoop.conf.Configuration conf)
Check if value is false
|
void |
set(org.apache.hadoop.conf.Configuration conf,
boolean value)
Set value in configuration for this key
|
void |
setIfUnset(org.apache.hadoop.conf.Configuration conf,
boolean value)
Set value in configuration if it hasn't been set already
|
compareTo, contains, equals, getDescription, getKey, hashCode, toString
public boolean getDefaultValue()
public boolean isDefaultValue(org.apache.hadoop.conf.Configuration conf)
AbstractConfOption
isDefaultValue
in class AbstractConfOption
conf
- Configurationpublic String getDefaultValueStr()
AbstractConfOption
getDefaultValueStr
in class AbstractConfOption
public ConfOptionType getType()
AbstractConfOption
getType
in class AbstractConfOption
public boolean get(org.apache.hadoop.conf.Configuration conf)
conf
- Configurationpublic boolean isFalse(org.apache.hadoop.conf.Configuration conf)
conf
- Configurationpublic boolean isTrue(org.apache.hadoop.conf.Configuration conf)
conf
- Configurationpublic void set(org.apache.hadoop.conf.Configuration conf, boolean value)
conf
- Configurationvalue
- to setpublic void setIfUnset(org.apache.hadoop.conf.Configuration conf, boolean value)
conf
- Configurationvalue
- to setCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.