com.holonplatform.core

## Interface CollectionConstantExpression<T>

- Type Parameters:
    `T` - Collection elements type
  All Superinterfaces:
    ConstantConverterExpression<Collection<T>,T>, ConverterExpression<T>, Expression, TypedExpression<T>

      public interface CollectionConstantExpression<T>
      extends ConstantConverterExpression<Collection<T>,T>

  A `ConstantConverterExpression` with a `Collection` value type.
  Since:
    5.1.0

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.holonplatform.core.Expression

      `Expression.ExpressionResolverFunction<E extends Expression,R extends Expression>, Expression.InvalidExpressionException`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T> CollectionConstantExpression<T>` | `create(Collection<? extends T> values)` Create a `CollectionConstantExpression` which represents a collection of constant values.
    `static <T> CollectionConstantExpression<T>` | `create(T... values)` Create a `CollectionConstantExpression` which represents a collection of constant values.
    `static <T> CollectionConstantExpression<T>` | `create(TypedExpression<T> expression, Collection<? extends T> values)` Create a `CollectionConstantExpression` which represents a collection of constant values, using given `expression` to inherit an `ExpressionValueConverter`, if available.
    `static <T> CollectionConstantExpression<T>` | `create(TypedExpression<T> expression, T... values)` Create a `CollectionConstantExpression` which represents a collection of constant values, using given `expression` to inherit an `ExpressionValueConverter`, if available.
    `Collection<?>` | `getModelValue()` Get the model data type value, using the `ExpressionValueConverter` to convert constant expression value, if available.
    `default boolean` | `hasValues()` Get whether the `Collection` expression value is not `null` or empty.

    - ### Methods inherited from interface com.holonplatform.core.ConstantConverterExpression

      `create, getValue`

    - ### Methods inherited from interface com.holonplatform.core.ConverterExpression

      `getExpressionValueConverter, getModelType, getModelValue`

    - ### Methods inherited from interface com.holonplatform.core.TypedExpression

      `getTemporalType, getType, isCollectionExpression, isConverterExpression`

    - ### Methods inherited from interface com.holonplatform.core.Expression

      `validate`

- - ### Method Detail

    - #### hasValues

          default boolean hasValues()

      Get whether the `Collection` expression value is not `null` or empty.
      Returns:
        `true` if the expression value is `null` or empty, `false` otherwise

    - #### getModelValue

          Collection<?> getModelValue()

      Description copied from interface: `ConstantConverterExpression`
      Get the model data type value, using the `ExpressionValueConverter` to convert constant expression value, if available. If an `ExpressionValueConverter` is not available, the original expression value is returned.
      Specified by:
        `getModelValue` in interface `ConstantConverterExpression<Collection<T>,T>`
      Returns:
        The model-converted expression value if an `ExpressionValueConverter` is available, otherwise `ConstantConverterExpression.getValue()` is returned.

    - #### create

          static <T> CollectionConstantExpression<T> create(Collection<? extends T> values)

      Create a `CollectionConstantExpression` which represents a collection of constant values.
      Specified by:
        `create` in interface `ConstantConverterExpression<Collection<T>,T>`
      Type Parameters:
        `T` - Expression type
      Parameters:
        `values` - Expression values (not null)
      Returns:
        A new collection expression

    - #### create

          @SafeVarargs
          static <T> CollectionConstantExpression<T> create(T... values)

      Create a `CollectionConstantExpression` which represents a collection of constant values.
      Specified by:
        `create` in interface `ConstantConverterExpression<Collection<T>,T>`
      Type Parameters:
        `T` - Expression type
      Parameters:
        `values` - Expression values (not null)
      Returns:
        A new collection expression

    - #### create

          static <T> CollectionConstantExpression<T> create(TypedExpression<T> expression,
                                                            Collection<? extends T> values)

      Create a `CollectionConstantExpression` which represents a collection of constant values, using given `expression` to inherit an `ExpressionValueConverter`, if available.
      Specified by:
        `create` in interface `ConstantConverterExpression<Collection<T>,T>`
      Type Parameters:
        `T` - Expression type
      Parameters:
        `expression` - Expression form which to inherit an `ExpressionValueConverter`, if available
        `values` - Expression values (not null)
      Returns:
        A new collection expression

    - #### create

          @SafeVarargs
          static <T> CollectionConstantExpression<T> create(TypedExpression<T> expression,
                                                                          T... values)

      Create a `CollectionConstantExpression` which represents a collection of constant values, using given `expression` to inherit an `ExpressionValueConverter`, if available.
      Specified by:
        `create` in interface `ConstantConverterExpression<Collection<T>,T>`
      Type Parameters:
        `T` - Expression type
      Parameters:
        `expression` - Expression form which to inherit an `ExpressionValueConverter`, if available
        `values` - Expression values (not null)
      Returns:
        A new collection expression

Copyright © 2019 The Holon Platform. All rights reserved.