public static final class ConfigOptions.OptionBuilder extends Object
ConfigOption
. It is instantiated via ConfigOptions.key(String)
.Modifier and Type | Method and Description |
---|---|
ConfigOptions.TypedConfigOptionBuilder<Boolean> |
booleanType()
Defines that the value of the option should be of
Boolean type. |
<T> ConfigOption<T> |
defaultValue(T value)
Deprecated.
define the type explicitly first with one of the intType(), stringType(),
etc.
|
ConfigOptions.TypedConfigOptionBuilder<Double> |
doubleType()
Defines that the value of the option should be of
Double type. |
ConfigOptions.TypedConfigOptionBuilder<java.time.Duration> |
durationType()
Defines that the value of the option should be of
Duration type. |
<T extends Enum<T>> |
enumType(Class<T> enumClass)
Defines that the value of the option should be of
Enum type. |
ConfigOptions.TypedConfigOptionBuilder<Float> |
floatType()
Defines that the value of the option should be of
Float type. |
ConfigOptions.TypedConfigOptionBuilder<Integer> |
intType()
Defines that the value of the option should be of
Integer type. |
ConfigOptions.TypedConfigOptionBuilder<Long> |
longType()
Defines that the value of the option should be of
Long type. |
ConfigOptions.TypedConfigOptionBuilder<Map<String,String>> |
mapType()
Defines that the value of the option should be a set of properties, which can be
represented as
Map<String, String> . |
ConfigOptions.TypedConfigOptionBuilder<MemorySize> |
memoryType()
Defines that the value of the option should be of
MemorySize type. |
ConfigOption<String> |
noDefaultValue()
Deprecated.
define the type explicitly first with one of the intType(), stringType(),
etc.
|
ConfigOptions.TypedConfigOptionBuilder<String> |
stringType()
Defines that the value of the option should be of
String type. |
public ConfigOptions.TypedConfigOptionBuilder<Boolean> booleanType()
Boolean
type.public ConfigOptions.TypedConfigOptionBuilder<Integer> intType()
Integer
type.public ConfigOptions.TypedConfigOptionBuilder<Long> longType()
Long
type.public ConfigOptions.TypedConfigOptionBuilder<Float> floatType()
Float
type.public ConfigOptions.TypedConfigOptionBuilder<Double> doubleType()
Double
type.public ConfigOptions.TypedConfigOptionBuilder<String> stringType()
String
type.public ConfigOptions.TypedConfigOptionBuilder<java.time.Duration> durationType()
Duration
type.public ConfigOptions.TypedConfigOptionBuilder<MemorySize> memoryType()
MemorySize
type.public <T extends Enum<T>> ConfigOptions.TypedConfigOptionBuilder<T> enumType(Class<T> enumClass)
Enum
type.enumClass
- Concrete type of the expected enum.public ConfigOptions.TypedConfigOptionBuilder<Map<String,String>> mapType()
Map<String, String>
.@Deprecated public <T> ConfigOption<T> defaultValue(T value)
This method does not accept "null". For options with no default value, choose one of
the noDefaultValue
methods.
T
- The type of the default value.value
- The default value for the config option@Deprecated public ConfigOption<String> noDefaultValue()
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.