com.holonplatform.core.presentation

## Interface StringValuePresenter

- Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

      @FunctionalInterface
      public interface StringValuePresenter

  Interface to present a generic value as a `String`.
  Since:
    5.0.0

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static ConfigProperty<Integer>` | `DECIMAL_POSITIONS` Presentation parameter to specify the decimal positions to use to present numeric type values
    `static ConfigProperty<Boolean>` | `DISABLE_GROUPING` Presentation parameter to disable the use of grouping symbol for numeric type values
    `static ConfigProperty<Boolean>` | `HIDE_DECIMALS_WHEN_ALL_ZERO` Presentation parameter to hide number decimals when all decimal positions (if any) are equal to zero
    `static ConfigProperty<Integer>` | `MAX_LENGTH` Presentation parameter to limit the max length of the presented String
    `static ConfigProperty<String>` | `MULTIPLE_VALUES_SEPARATOR` Presentation parameter to set the separator to use when presenting multiple values (Arrays and Collections)
    `static ConfigProperty<Boolean>` | `PERCENT_STYLE` Presentation parameter to use percent-style format for numeric decimal values
    `static String` | `PRESENTATION_PARAMETERS_PREFIX`
    `static ConfigProperty<TemporalType>` | `TEMPORAL_TYPE` Presentation parameter to set the `TemporalType` to use to present `Date` and `Calendar` values

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static StringValuePresenter` | `getDefault()` Get the default `StringValuePresenter`, using the `LocalizationContext`, if available as `Context` resource, to format dates and numbers and to localize any `Localizable` message.
    `<T,V extends T> String` | `present(Class<? extends T> valueType, V value, ParameterSet parameters)` Present given `value` of given `valueType` as a String.
    `default <T,V extends T> String` | `present(Class<T> valueType, V value)` Present given `value` of given `valueType` as a String.
    `default String` | `present(Object value)` Present given `value` as a String.
    `default String` | `present(Object value, ParameterSet parameters)` Present given `value` as a String using given presentation parameters.

- - ### Field Detail

    - #### PRESENTATION_PARAMETERS_PREFIX

          static final String PRESENTATION_PARAMETERS_PREFIX

      See Also:
        Constant Field Values

    - #### MULTIPLE_VALUES_SEPARATOR

          static final ConfigProperty<String> MULTIPLE_VALUES_SEPARATOR

      Presentation parameter to set the separator to use when presenting multiple values (Arrays and Collections)

    - #### MAX_LENGTH

          static final ConfigProperty<Integer> MAX_LENGTH

      Presentation parameter to limit the max length of the presented String

    - #### DECIMAL_POSITIONS

          static final ConfigProperty<Integer> DECIMAL_POSITIONS

      Presentation parameter to specify the decimal positions to use to present numeric type values

    - #### DISABLE_GROUPING

          static final ConfigProperty<Boolean> DISABLE_GROUPING

      Presentation parameter to disable the use of grouping symbol for numeric type values

    - #### HIDE_DECIMALS_WHEN_ALL_ZERO

          static final ConfigProperty<Boolean> HIDE_DECIMALS_WHEN_ALL_ZERO

      Presentation parameter to hide number decimals when all decimal positions (if any) are equal to zero

    - #### PERCENT_STYLE

          static final ConfigProperty<Boolean> PERCENT_STYLE

      Presentation parameter to use percent-style format for numeric decimal values

    - #### TEMPORAL_TYPE

          static final ConfigProperty<TemporalType> TEMPORAL_TYPE

      Presentation parameter to set the `TemporalType` to use to present `Date` and `Calendar` values

  - ### Method Detail

    - #### present

          <T,V extends T> String present(Class<? extends T> valueType,
                                         V value,
                                         ParameterSet parameters)

      Present given `value` of given `valueType` as a String. Presentation parameters may be specified passing a `ParameterSet`.
      Type Parameters:
        `T` - Type of the value to present
        `V` - Actual value type
      Parameters:
        `valueType` - Value type
        `value` - Value to present
        `parameters` - Optional presentation parameters
      Returns:
        String value

    - #### present

          default <T,V extends T> String present(Class<T> valueType,
                                                 V value)

      Present given `value` of given `valueType` as a String.
      Type Parameters:
        `T` - Type of the value to present
        `V` - Actual value type
      Parameters:
        `valueType` - Value type
        `value` - Value to present
      Returns:
        String value

    - #### present

          default String present(Object value,
                                 ParameterSet parameters)

      Present given `value` as a String using given presentation parameters.
      Parameters:
        `value` - Value to present
        `parameters` - Optional presentation parameters
      Returns:
        String value

    - #### present

          default String present(Object value)

      Present given `value` as a String.
      Parameters:
        `value` - Value to present
      Returns:
        String value

    - #### getDefault

          static StringValuePresenter getDefault()

      Get the default `StringValuePresenter`, using the `LocalizationContext`, if available as `Context` resource, to format dates and numbers and to localize any `Localizable` message.
      Returns:
        Default `StringValuePresenter`

Copyright © 2019 The Holon Platform. All rights reserved.