Interface IMutableConfiguration<T extends IConfigurationFeature<?>>
-
- Type Parameters:
T- the type of the feature set
- All Superinterfaces:
IConfiguration<T>
- All Known Implementing Classes:
DefaultConfiguration
public interface IMutableConfiguration<T extends IConfigurationFeature<?>> extends IConfiguration<T>
This interface provides methods for retrieving and updating the configuration of processors and parsers in this library. This provides a mutable view of the current configuration.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description IMutableConfiguration<T>applyConfiguration(IConfiguration<T> other)Replace this configuration with theotherconfiguration.default IMutableConfiguration<T>disableFeature(T feature)Turn off the provided feature.default IMutableConfiguration<T>enableFeature(T feature)Turn on the provided feature.IMutableConfiguration<T>set(T feature, Object value)Set the value of the providedfeatureto the provided value.-
Methods inherited from interface gov.nist.secauto.metaschema.core.configuration.IConfiguration
get, getFeatureValues, isFeatureEnabled
-
-
-
-
Method Detail
-
enableFeature
@NonNull default IMutableConfiguration<T> enableFeature(@NonNull T feature)
Turn on the provided feature.- Parameters:
feature- the feature to turn on- Returns:
- the updated configuration
- Throws:
UnsupportedOperationException- if the feature is not a boolean valued feature- See Also:
IConfigurationFeature.getValueClass()
-
disableFeature
@NonNull default IMutableConfiguration<T> disableFeature(@NonNull T feature)
Turn off the provided feature.- Parameters:
feature- the feature to turn off- Returns:
- the updated configuration
- Throws:
UnsupportedOperationException- if the feature is not a boolean valued feature- See Also:
IConfigurationFeature.getValueClass()
-
applyConfiguration
@NonNull IMutableConfiguration<T> applyConfiguration(@NonNull IConfiguration<T> other)
Replace this configuration with theotherconfiguration.- Parameters:
other- the new configuration- Returns:
- the updated configuration
-
set
@NonNull IMutableConfiguration<T> set(@NonNull T feature, @NonNull Object value)
Set the value of the providedfeatureto the provided value.- Parameters:
feature- the feature to setvalue- the value to set- Returns:
- the updated configuration
- Throws:
UnsupportedOperationException- if the provided feature value is not assignment compatible with the features value type- See Also:
IConfigurationFeature.getValueClass()
-
-