B
- the builder typepublic abstract class AbstractFeatureAwareBuilder<B> extends Object
Constructor and Description |
---|
AbstractFeatureAwareBuilder() |
Modifier and Type | Method and Description |
---|---|
B |
disableFeature(Feature featureToDisable)
Disable a feature.
|
B |
enableFeature(Feature featureToEnable)
Enable a feature.
|
protected B |
getBuilder()
Returns the builder instance.
|
protected abstract Set<Feature> |
getEnabledFeatures()
Return the list of enabled features.
|
protected abstract Set<Feature> |
getSupportedFeatures()
Returns the list of supported features.
|
B |
inheritFeatures(Collection<Feature> features)
Inherit the features as long as they are supported.
|
boolean |
isFeatureEnabled(Feature feature)
Check whether the given feature is enabled.
|
boolean |
isFeatureSupported(Feature feature)
Check whether the given feature is supported.
|
protected abstract Set<Feature> getSupportedFeatures()
protected abstract Set<Feature> getEnabledFeatures()
public B enableFeature(Feature featureToEnable)
featureToEnable
- the feature to enablepublic B disableFeature(Feature featureToDisable)
featureToDisable
- the feature to disablepublic boolean isFeatureEnabled(Feature feature)
feature
- the feature to checkpublic boolean isFeatureSupported(Feature feature)
feature
- the feature to checkpublic B inheritFeatures(Collection<Feature> features)
features
- list of features to inherit.protected B getBuilder()
Copyright © 2019. All rights reserved.