@Internal public class PythonConfig extends Object implements ReadableConfig
Constructor and Description |
---|
PythonConfig(ReadableConfig configuration,
ReadableConfig pythonDependencyConfiguration) |
Modifier and Type | Method and Description |
---|---|
<T> T |
get(ConfigOption<T> option)
Reads a value using the metadata included in
ConfigOption . |
<T> Optional<T> |
getOptional(ConfigOption<T> option)
Reads a value using the metadata included in
ConfigOption . |
Configuration |
toConfiguration() |
public PythonConfig(ReadableConfig configuration, ReadableConfig pythonDependencyConfiguration)
public <T> T get(ConfigOption<T> option)
ReadableConfig
ConfigOption
. Returns the ConfigOption.defaultValue()
if value key not present in the configuration.get
in interface ReadableConfig
T
- type of the value to readoption
- metadata of the option to readConfigOption.defaultValue()
if not foundReadableConfig.getOptional(ConfigOption)
public <T> Optional<T> getOptional(ConfigOption<T> option)
ReadableConfig
ConfigOption
. In contrast to ReadableConfig.get(ConfigOption)
returns Optional.empty()
if value not present.getOptional
in interface ReadableConfig
T
- type of the value to readoption
- metadata of the option to readOptional.empty()
if not foundReadableConfig.get(ConfigOption)
public Configuration toConfiguration()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.