com.holonplatform.vaadin.flow.components.support

## Interface InputAdaptersContainer<T>

- Type Parameters:
    `T` - Input type
  All Superinterfaces:
    Serializable

      public interface InputAdaptersContainer<T>
      extends Serializable

  Input adapters container.
  Since:
    5.2.5

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T> InputAdaptersContainer<T>` | `create()` Create a new `InputAdaptersContainer`.
    `<A> Map<Class<A>,Function<Input<T>,A>>` | `getAdapters()` Get the available adapters.
    `<A> Optional<A>` | `getAs(Input<T> input, Class<A> type)` Get the input adapted to given type.
    `<A> void` | `setAdapter(Class<A> type, Function<Input<T>,A> adapter)` Set the adapter for given type.

- - ### Method Detail

    - #### setAdapter

          <A> void setAdapter(Class<A> type,
                              Function<Input<T>,A> adapter)

      Set the adapter for given type.
      Type Parameters:
        `A` - Adapter type
      Parameters:
        `type` - Adapter type (not null)
        `adapter` - Adapter function

    - #### getAs

          <A> Optional<A> getAs(Input<T> input,
                                Class<A> type)

      Get the input adapted to given type.
      Type Parameters:
        `A` - Adapter type
      Parameters:
        `input` - The input
        `type` - The adapter type (not null)
      Returns:
        Optional adapted instance

    - #### getAdapters

          <A> Map<Class<A>,Function<Input<T>,A>> getAdapters()

      Get the available adapters.
      Type Parameters:
        `A` - Adapter type
      Returns:
        A map of type and adapter, empty if none

    - #### create

          static <T> InputAdaptersContainer<T> create()

      Create a new `InputAdaptersContainer`.
      Type Parameters:
        `T` - Input type
      Returns:
        A new `InputAdaptersContainer` instance

Copyright © 2019 The Holon Platform. All rights reserved.