com.holonplatform.vaadin.flow.navigator.internal

## Enum DefaultNavigationParameterMapper

- java.lang.Object
- - java.lang.Enum<DefaultNavigationParameterMapper>
  - - com.holonplatform.vaadin.flow.navigator.internal.DefaultNavigationParameterMapper

- All Implemented Interfaces:
    NavigationParameterMapper, Serializable, Comparable<DefaultNavigationParameterMapper>

      public enum DefaultNavigationParameterMapper
      extends Enum<DefaultNavigationParameterMapper>
      implements NavigationParameterMapper

  Default `NavigationParameterMapper` implementation.
  Since:
    5.2.0

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `INSTANCE` Singleton instance

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> List<T>` | `deserialize(Class<T> type, List<String> values)` Deserialize given parameter `values`.
    `List<String>` | `serialize(Object value)` Serialize given parameter `value`.
    `static DefaultNavigationParameterMapper` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static DefaultNavigationParameterMapper[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface com.holonplatform.vaadin.flow.navigator.NavigationParameterMapper

      `deserialize, get`

- - ### Enum Constant Detail

    - #### INSTANCE

          public static final DefaultNavigationParameterMapper INSTANCE

      Singleton instance

  - ### Method Detail

    - #### values

          public static DefaultNavigationParameterMapper[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (DefaultNavigationParameterMapper c : DefaultNavigationParameterMapper.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static DefaultNavigationParameterMapper valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `IllegalArgumentException` - if this enum type has no constant with the specified name
        `NullPointerException` - if the argument is null

    - #### serialize

          public List<String> serialize(Object value)
                                 throws InvalidNavigationParameterException

      Description copied from interface: `NavigationParameterMapper`
      Serialize given parameter `value`.
      Specified by:
        `serialize` in interface `NavigationParameterMapper`
      Parameters:
        `value` - Parameter value (may be null)
      Returns:
        A list of serialized parameter values, empty if none
      Throws:
        `InvalidNavigationParameterException` - If an error occurred

    - #### deserialize

          public <T> List<T> deserialize(Class<T> type,
                                         List<String> values)
                                  throws InvalidNavigationParameterException

      Description copied from interface: `NavigationParameterMapper`
      Deserialize given parameter `values`.
      Specified by:
        `deserialize` in interface `NavigationParameterMapper`
      Type Parameters:
        `T` - Parameter type
      Parameters:
        `type` - Parameter type (not null)
        `values` - The parameter values, empty if none
      Returns:
        A list of deserialized parameter values, empty if none
      Throws:
        `InvalidNavigationParameterException` - If an error occurred

Copyright © 2020 The Holon Platform. All rights reserved.