T
- The class type of WithParams implementation itself.@PublicEvolving
public interface WithParams<T>
Modifier and Type | Method and Description |
---|---|
default <V> V |
get(Param<V> param)
Gets the value of the parameter.
|
default <V> Param<V> |
getParam(String name)
Gets the parameter by its name.
|
Map<Param<?>,Object> |
getParamMap()
Returns a map which should contain value for every parameter that meets one of the following
conditions.
|
default <V> T |
set(Param<V> param,
V value)
Sets the value of the parameter.
|
default <V> Param<V> getParam(String name)
V
- The class type of the parameter value.name
- The parameter name.default <V> T set(Param<V> param, V value)
param
- The parameter.value
- The parameter value.default <V> V get(Param<V> param)
V
- The class type of the parameter value.param
- The parameter.Map<Param<?>,Object> getParamMap()
1) set(...) has been called to set value for this parameter.
2) The parameter is a public final field of this WithParams instance. This includes fields inherited from its interfaces and super-classes.
The subclass which implements this interface could meet this requirement by returning a
member field of the given map type, after having initialized this member field using the
ParamUtils.initializeMapWithDefaultValues(Map, WithParams)
method.
Copyright © 2019–2023 The Apache Software Foundation. All rights reserved.