public final class FeatureBasedContainer<T> extends Object implements FeatureBased
FeatureExpression
.Modifier and Type | Method and Description |
---|---|
Optional<FeatureExpression> |
getActivateByFeatureExpression()
Returns the condition which has to match for this instance to be provided
|
static <V> FeatureBasedContainer<V> |
of(V element)
Creates a new
FeatureBasedContainer with the given element and without expression. |
static <V> FeatureBasedContainer<V> |
of(V element,
FeatureExpression expression)
Creates a new
FeatureBasedContainer with the given element and expression. |
public static <V> FeatureBasedContainer<V> of(V element)
FeatureBasedContainer
with the given element and without expression.element
- The element which is stored in the new container. Must not be null
.NullPointerException
- If the given element is null
.public static <V> FeatureBasedContainer<V> of(V element, FeatureExpression expression)
FeatureBasedContainer
with the given element and expression.element
- The element which is stored in the new container. Must not be null
.expression
- The feature expression to control whether this element is used or not. Must not be null
.NullPointerException
- If the given element or the given feature expression is null
.@Pure public Optional<FeatureExpression> getActivateByFeatureExpression()
FeatureBased
getActivateByFeatureExpression
in interface FeatureBased
FeatureExpression
. An empty Optional
is handled like an expression which evaluates
to true.Copyright © 2018–2019 b+m Informatik AG. All rights reserved.