com.holonplatform.datastore.mongo.core.expression

## Interface Value<T>

- Type Parameters:
    `T` - Value type
  All Superinterfaces:
    com.holonplatform.core.Expression

      public interface Value<T>
      extends com.holonplatform.core.Expression

  Expression which represents a value which can be bound to a `Property`.
  Since:
    5.2.0

- - ### Nested Class Summary

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

      `com.holonplatform.core.Expression.ExpressionResolverFunction<E extends com.holonplatform.core.Expression,R extends com.holonplatform.core.Expression>, com.holonplatform.core.Expression.InvalidExpressionException`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T> Value<T>` | `create(T value)` Create a new `Value`.
    `static <T> Value<T>` | `create(T value, EnumCodecStrategy enumCodecStrategy)` Create a new `Value`.
    `static <T> Value<T>` | `create(T value, com.holonplatform.core.TypedExpression<T> expression)` Create a new `Value`.
    `static <T> Value<T>` | `create(T value, com.holonplatform.core.TypedExpression<T> expression, EnumCodecStrategy enumCodecStrategy)` Create a new `Value`.
    `Optional<EnumCodecStrategy>` | `getEnumCodecStrategy()` Get the `EnumCodecStrategy` to use to encode/decode `Enum` type values.
    `Optional<com.holonplatform.core.TypedExpression<T>>` | `getExpression()` Get the `TypedExpression` to which the value is bound, if any.
    `T` | `getValue()` Get the expression value.

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

      `validate`

- - ### Method Detail

    - #### getValue

          T getValue()

      Get the expression value.
      Returns:
        The expression value

    - #### getEnumCodecStrategy

          Optional<EnumCodecStrategy> getEnumCodecStrategy()

      Get the `EnumCodecStrategy` to use to encode/decode `Enum` type values.
      Returns:
        The enum codec strategy, if specified

    - #### getExpression

          Optional<com.holonplatform.core.TypedExpression<T>> getExpression()

      Get the `TypedExpression` to which the value is bound, if any.
      Returns:
        Optional expression to which the value is bound

    - #### create

          static <T> Value<T> create(T value)

      Create a new `Value`.
      Type Parameters:
        `T` - Value type
      Parameters:
        `value` - The path value
      Returns:
        A new `Value` instance

    - #### create

          static <T> Value<T> create(T value,
                                     com.holonplatform.core.TypedExpression<T> expression)

      Create a new `Value`.
      Type Parameters:
        `T` - Value type
      Parameters:
        `value` - The path value
        `expression` - The expression to which the value is bound
      Returns:
        A new `Value` instance

    - #### create

          static <T> Value<T> create(T value,
                                     EnumCodecStrategy enumCodecStrategy)

      Create a new `Value`.
      Type Parameters:
        `T` - Value type
      Parameters:
        `value` - The path value
        `enumCodecStrategy` - The `EnumCodecStrategy` to use
      Returns:
        A new `Value` instance

    - #### create

          static <T> Value<T> create(T value,
                                     com.holonplatform.core.TypedExpression<T> expression,
                                     EnumCodecStrategy enumCodecStrategy)

      Create a new `Value`.
      Type Parameters:
        `T` - Value type
      Parameters:
        `value` - The path value
        `expression` - The expression to which the value is bound
        `enumCodecStrategy` - The `EnumCodecStrategy` to use
      Returns:
        A new `Value` instance

Copyright © 2019 The Holon Platform. All rights reserved.