Interface IConfiguration<T extends IConfigurationFeature<?>>
-
- Type Parameters:
T
- the type of the feature set
- All Known Subinterfaces:
IMutableConfiguration<T>
- All Known Implementing Classes:
DefaultConfiguration
public interface IConfiguration<T extends IConfigurationFeature<?>>
The base interface for getting the configuration of processors and parsers in this library. This provides an immutable view of the current configuration.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <V> V
get(T feature)
Get the configuration value of the providedfeature
.Map<T,Object>
getFeatureValues()
Get the mapping of each feature mapped to its value.boolean
isFeatureEnabled(T feature)
Determines if a specific feature is enabled.
-
-
-
Method Detail
-
isFeatureEnabled
boolean isFeatureEnabled(@NonNull T feature)
Determines if a specific feature is enabled.- Parameters:
feature
- the feature to check for- Returns:
true
if the feature is enabled, orfalse
otherwise- Throws:
UnsupportedOperationException
- if the feature is not a boolean valued feature- See Also:
IConfigurationFeature.getValueClass()
-
get
@NonNull default <V> V get(@NonNull T feature)
Get the configuration value of the providedfeature
.- Type Parameters:
V
- the value type- Parameters:
feature
- the requested feature- Returns:
- the value of the feature
-
getFeatureValues
@NonNull Map<T,Object> getFeatureValues()
Get the mapping of each feature mapped to its value.- Returns:
- the mapping
-
-