10Duke Java Core
Loading...
Searching...
No Matches
tenduke.sdk.core.model.config.AbstractConfigWithFallback< C extends Configuration > Class Template Referenceabstract

Detailed Description

A configuration structure base class that supports implementation of a configuration fallback stack.

To terminate the recursion set the fallback configuration to a non recursive implementation.

Parameters
<C>Type of configuration used in the fallback stack.
Inheritance diagram for tenduke.sdk.core.model.config.AbstractConfigWithFallback< C extends Configuration >:
tenduke.sdk.core.model.config.Configuration

Public Member Functions

 AbstractConfigWithFallback (final C config, final C fallback)
 Initializes a new instance of this class with the given configuration and fallback instances.
 
AbstractConfigWithFallback withConfig (final C config)
 Sets the configuration instance to use as priority one.
 
AbstractConfigWithFallback withFallbackConfig (final C config)
 Sets the configuration instance to use as a fallback.
 
- Public Member Functions inherited from tenduke.sdk.core.model.config.Configuration
< U > U unwrap ()
 Unwraps the underlying implementation and returns it to the caller.
 

Constructor & Destructor Documentation

◆ AbstractConfigWithFallback()

Initializes a new instance of this class with the given configuration and fallback instances.

Parameters
configThe first level configuration instance.
fallbackThe fallback configuration to use if the first level configuration does not provide a value.

Member Function Documentation

◆ withConfig()

Sets the configuration instance to use as priority one.

Parameters
configThe priority configuration to use first.
Returns
this instance.

◆ withFallbackConfig()

Sets the configuration instance to use as a fallback.

Parameters
configThe fallback configuration to use only if the configuration with priority does not provide a value. Note: a not null value is required.
Returns
this instance.

The documentation for this class was generated from the following file: