T
- type of the configuration value.@ForRuntime public final class OptionalProperty<T> extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
T |
get() |
void |
overwritePropertiesIfPresent(java.util.Properties properties,
java.lang.String key) |
void |
set(T value) |
void |
transformPropertiesIfPresent(java.util.Properties properties,
java.lang.String key,
java.util.function.BiConsumer<java.util.Properties,T> transformer) |
static <T> OptionalProperty<T> |
withDefault(T defaultValue) |
static <T> OptionalProperty<T> |
withoutDefault() |
public static <T> OptionalProperty<T> withDefault(T defaultValue)
public static <T> OptionalProperty<T> withoutDefault()
public void set(T value)
public T get()
public void overwritePropertiesIfPresent(java.util.Properties properties, java.lang.String key)
public void transformPropertiesIfPresent(java.util.Properties properties, java.lang.String key, java.util.function.BiConsumer<java.util.Properties,T> transformer)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.