Class FeatureBasedContainer<T>

  • All Implemented Interfaces:
    FeatureBased

    public final class FeatureBasedContainer<T>
    extends java.lang.Object
    implements FeatureBased
    This is a container which holds a single non-null element and an optional FeatureExpression.
    Since:
    3.3.0
    • Method Detail

      • of

        public static <V> FeatureBasedContainer<V> of​(V element)
        Creates a new FeatureBasedContainer with the given element and without expression.
        Parameters:
        element - The element which is stored in the new container. Must not be null.
        Returns:
        A new container.
        Throws:
        java.lang.NullPointerException - If the given element is null.
        Since:
        3.3.0
      • of

        public static <V> FeatureBasedContainer<V> of​(V element,
                                                      FeatureExpression expression)
        Creates a new FeatureBasedContainer with the given element and expression.
        Parameters:
        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.
        Returns:
        A new container.
        Throws:
        java.lang.NullPointerException - If the given element or the given feature expression is null.
        Since:
        3.3.0