com.holonplatform.vaadin.flow.components

## Interface SingleSelect<T>

- Type Parameters:
    `T` - Selection item type
  All Superinterfaces:
    HasComponent, com.vaadin.flow.component.HasElement, Input<T>, ItemSet, Selectable<T>, Serializable, ValueComponent<T>, ValueHolder<T,ValueHolder.ValueChangeEvent<T>>
  All Known Subinterfaces:
    ValidatableSingleSelect<T>

      public interface SingleSelect<T>
      extends Selectable<T>, Input<T>, ItemSet

  A `Selectable` component in which at most one item can be selected at a time.
  Since:
    5.0.0

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.holonplatform.vaadin.flow.components.Selectable

      `Selectable.SelectionEvent<T>, Selectable.SelectionListener<T>, Selectable.SelectionMode`

    - ### Nested classes/interfaces inherited from interface com.holonplatform.vaadin.flow.components.Input

      `Input.InputPropertyRenderer<T>, Input.InputValueConversionException, Input.PropertyHandler<P,T,V extends com.vaadin.flow.component.HasValue<?,T>,C extends com.vaadin.flow.component.Component>`

    - ### Nested classes/interfaces inherited from interface com.holonplatform.vaadin.flow.components.ValueHolder

      `ValueHolder.ValueChangeEvent<V>, ValueHolder.ValueChangeListener<V,E extends ValueHolder.ValueChangeEvent<V>>`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T> FilterableSingleSelectConfigurator.FilterableSingleSelectInputBuilder<T,T>` | `create(Class<T> type)` Gets a builder to create a filterable `SingleSelect`, which uses a `ComboBox` as input component.
    `static <T,ITEM> FilterableSingleSelectConfigurator.FilterableSingleSelectInputBuilder<T,ITEM>` | `create(Class<T> type, Class<ITEM> itemType, ItemConverter<T,ITEM> itemConverter)` Gets a builder to create a filterable `SingleSelect`, which uses a `ComboBox` as input component.
    `static <T> FilterableSingleSelectConfigurator.PropertyFilterableSingleSelectInputBuilder<T>` | `create(com.holonplatform.core.property.Property<T> selectionProperty)` Gets a builder to create a `Property` model based filterable `SingleSelect`, which uses a `ComboBox` as input component.
    `static <T> FilterableSingleSelectConfigurator.PropertyFilterableSingleSelectInputBuilder<T>` | `create(com.holonplatform.core.property.Property<T> selectionProperty, Function<T,Optional<com.holonplatform.core.property.PropertyBox>> itemConverter)` Gets a builder to create a `Property` model based filterable `SingleSelect`, which uses a `ComboBox` as input component.
    `default void` | `deselectAll()` Deselects all currently selected items, if any.
    `static <T> FilterableSingleSelectConfigurator.FilterableSingleSelectInputBuilder<T,T>` | `filterable(Class<T> type)` Gets a builder to create a filterable `SingleSelect`, which uses a `ComboBox` as input component.
    `static <T,ITEM> FilterableSingleSelectConfigurator.FilterableSingleSelectInputBuilder<T,ITEM>` | `filterable(Class<T> type, Class<ITEM> itemType, ItemConverter<T,ITEM> itemConverter)` Gets a builder to create a filterable `SingleSelect`, which uses a `ComboBox` as input component.
    `static <T> FilterableSingleSelectConfigurator.PropertyFilterableSingleSelectInputBuilder<T>` | `filterable(com.holonplatform.core.property.Property<T> selectionProperty)` Gets a builder to create a `Property` model based filterable `SingleSelect`, which uses a `ComboBox` as input component.
    `static <T> FilterableSingleSelectConfigurator.PropertyFilterableSingleSelectInputBuilder<T>` | `filterable(com.holonplatform.core.property.Property<T> selectionProperty, Function<T,Optional<com.holonplatform.core.property.PropertyBox>> itemConverter)` Gets a builder to create a `Property` model based filterable `SingleSelect`, which uses a `ComboBox` as input component.
    `default Optional<T>` | `getFirstSelectedItem()` Get the first selected item.
    `Optional<T>` | `getSelectedItem()` Get the currently selected item.
    `default Set<T>` | `getSelectedItems()` Get an immutable set of the currently selected items.
    `default Selectable.SelectionMode` | `getSelectionMode()` Get the selection mode
    `static <T> OptionsSingleSelectConfigurator.OptionsSingleSelectInputBuilder<T,T>` | `options(Class<T> type)` Gets a builder to create a options `SingleSelect`, which uses a `RadioButtonGroup` as input component.
    `static <T,ITEM> OptionsSingleSelectConfigurator.OptionsSingleSelectInputBuilder<T,ITEM>` | `options(Class<T> type, Class<ITEM> itemType, ItemConverter<T,ITEM> itemConverter)` Gets a builder to create a options `SingleSelect`, which uses a `RadioButtonGroup` as input component.
    `static <T> OptionsSingleSelectConfigurator.PropertyOptionsSingleSelectInputBuilder<T>` | `options(com.holonplatform.core.property.Property<T> selectionProperty)` Gets a builder to create a `Property` model based options `SingleSelect`, which uses a `RadioButtonGroup` as input component.
    `static <T> OptionsSingleSelectConfigurator.PropertyOptionsSingleSelectInputBuilder<T>` | `options(com.holonplatform.core.property.Property<T> selectionProperty, Function<T,Optional<com.holonplatform.core.property.PropertyBox>> itemConverter)` Gets a builder to create a `Property` model based options `SingleSelect`, which uses a `RadioButtonGroup` as input component.
    `static <T> SingleSelectConfigurator.SingleSelectInputBuilder<T,T>` | `select(Class<T> type)` Gets a builder to create a `SingleSelect`, which uses a `Select` as input component.
    `static <T,ITEM> SingleSelectConfigurator.SingleSelectInputBuilder<T,ITEM>` | `select(Class<T> type, Class<ITEM> itemType, ItemConverter<T,ITEM> itemConverter)` Gets a builder to create a `SingleSelect`, which uses a `Select` as input component.
    `static <T> SingleSelectConfigurator.PropertySingleSelectInputBuilder<T>` | `select(com.holonplatform.core.property.Property<T> selectionProperty)` Gets a builder to create a `Property` model based `SingleSelect`, which uses a `Select` as input component.
    `static <T> SingleSelectConfigurator.PropertySingleSelectInputBuilder<T>` | `select(com.holonplatform.core.property.Property<T> selectionProperty, Function<T,Optional<com.holonplatform.core.property.PropertyBox>> itemConverter)` Gets a builder to create a `Property` model based `SingleSelect`, which uses a `Select` as input component.

    - ### Methods inherited from interface com.holonplatform.vaadin.flow.components.Selectable

      `addSelectionListener, deselect, isSelected, select`

    - ### Methods inherited from interface com.holonplatform.vaadin.flow.components.Input

      `as, asHasValue, boolean_, builder, builder, builder, date, dateTime, enumMultiSelect, enumOptionSelect, enumSelect, focus, from, from, from, from, from, hasInvalidChangeEventNotifier, hasPlaceholder, hasTitle, isReadOnly, isRequired, localDate, localDateTime, localTime, multiOptionSelect, multiOptionSelect, multiOptionSelect, multiOptionSelect, number, password, setReadOnly, setRequired, singleOptionSelect, singleOptionSelect, singleOptionSelect, singleOptionSelect, singleSelect, singleSelect, singleSelect, singleSelect, singleSimpleSelect, singleSimpleSelect, singleSimpleSelect, singleSimpleSelect, string, stringArea`

    - ### Methods inherited from interface com.holonplatform.vaadin.flow.components.ValueHolder

      `addValueChangeListener, clear, getEmptyValue, getValue, getValueIfPresent, isEmpty, setValue`

    - ### Methods inherited from interface com.holonplatform.vaadin.flow.components.ValueComponent

      `getValue, hasValueChangeMode`

    - ### Methods inherited from interface com.holonplatform.vaadin.flow.components.HasComponent

      `create, getComponent, getElement, hasEnabled, hasLabel, hasSize, hasStyle, hasValidation, isVisible, setVisible`

    - ### Methods inherited from interface com.holonplatform.vaadin.flow.components.ItemSet

      `refresh`

- - ### Method Detail

    - #### getSelectedItem

          Optional<T> getSelectedItem()

      Get the currently selected item.
      Returns:
        The currently selected item, empty if no item is selected

    - #### getSelectionMode

          default Selectable.SelectionMode getSelectionMode()

      Description copied from interface: `Selectable`
      Get the selection mode
      Specified by:
        `getSelectionMode` in interface `Selectable<T>`
      Returns:
        the selection mode

    - #### getSelectedItems

          default Set<T> getSelectedItems()

      Description copied from interface: `Selectable`
      Get an immutable set of the currently selected items.

      The iteration order of the items in the returned set is implementation dependent.

      Specified by:
        `getSelectedItems` in interface `Selectable<T>`
      Returns:
        Selected items set, empty if none

    - #### getFirstSelectedItem

          default Optional<T> getFirstSelectedItem()

      Description copied from interface: `Selectable`
      Get the first selected item.
      Specified by:
        `getFirstSelectedItem` in interface `Selectable<T>`
      Returns:
        the first selected item, empty if none

    - #### deselectAll

          default void deselectAll()

      Description copied from interface: `Selectable`
      Deselects all currently selected items, if any.
      Specified by:
        `deselectAll` in interface `Selectable<T>`

    - #### create

          static <T> FilterableSingleSelectConfigurator.FilterableSingleSelectInputBuilder<T,T> create(Class<T> type)

      Gets a builder to create a filterable `SingleSelect`, which uses a `ComboBox` as input component.

      Alias for `filterable(Class)`.

      This builder can be used when the selection items type and the selection value type are consistent. Use `create(Class, Class, ItemConverter)` if not.

      Specified by:
        `create` in interface `Input<T>`
      Type Parameters:
        `T` - Value type
      Parameters:
        `type` - Selection value type (not null)
      Returns:
        A new `FilterableSingleSelectConfigurator.FilterableSingleSelectInputBuilder`

    - #### create

          static <T,ITEM> FilterableSingleSelectConfigurator.FilterableSingleSelectInputBuilder<T,ITEM> create(Class<T> type,
                                                                                                               Class<ITEM> itemType,
                                                                                                               ItemConverter<T,ITEM> itemConverter)

      Gets a builder to create a filterable `SingleSelect`, which uses a `ComboBox` as input component.

      Alias for `filterable(Class, Class, ItemConverter)`.

      This builder can be used when the selection items type and the selection value type are not consistent (i.e. of different type). When the the selection item and the selection value types are consistent, the `create(Class)` method can be used.

      Type Parameters:
        `T` - Value type
        `ITEM` - Item type
      Parameters:
        `type` - Selection value type (not null)
        `itemType` - Selection items type (not null)
        `itemConverter` - The item converter to use to convert a selection item into a selection (Input) value and back (not null)
      Returns:
        A new `FilterableSingleSelectConfigurator.FilterableSingleSelectInputBuilder`

    - #### create

          static <T> FilterableSingleSelectConfigurator.PropertyFilterableSingleSelectInputBuilder<T> create(com.holonplatform.core.property.Property<T> selectionProperty)

      Gets a builder to create a `Property` model based filterable `SingleSelect`, which uses a `ComboBox` as input component.

      Alias for `filterable(Property)`.

      Specified by:
        `create` in interface `Input<T>`
      Type Parameters:
        `T` - Value type
      Parameters:
        `selectionProperty` - The property to use to represent the selection value (not null)
      Returns:
        A new `FilterableSingleSelectConfigurator.PropertyFilterableSingleSelectInputBuilder`
      See Also:
        `PropertyRendererRegistry`

    - #### create

          static <T> FilterableSingleSelectConfigurator.PropertyFilterableSingleSelectInputBuilder<T> create(com.holonplatform.core.property.Property<T> selectionProperty,
                                                                                                             Function<T,Optional<com.holonplatform.core.property.PropertyBox>> itemConverter)

      Gets a builder to create a `Property` model based filterable `SingleSelect`, which uses a `ComboBox` as input component.

      Alias for `filterable(Property, Function)`.

      Type Parameters:
        `T` - Value type
      Parameters:
        `selectionProperty` - The property to use to represent the selection value (not null)
        `itemConverter` - The function to use to convert a selection value into the corresponding `PropertyBox` item
      Returns:
        A new `FilterableSingleSelectConfigurator.PropertyFilterableSingleSelectInputBuilder`

    - #### select

          static <T> SingleSelectConfigurator.SingleSelectInputBuilder<T,T> select(Class<T> type)

      Gets a builder to create a `SingleSelect`, which uses a `Select` as input component.

      This builder can be used when the selection items type and the selection value type are consistent. Use `create(Class, Class, ItemConverter)` if not.

      Type Parameters:
        `T` - Value type
      Parameters:
        `type` - Selection value type (not null)
      Returns:
        A new `SingleSelectConfigurator.SingleSelectInputBuilder`

    - #### select

          static <T,ITEM> SingleSelectConfigurator.SingleSelectInputBuilder<T,ITEM> select(Class<T> type,
                                                                                           Class<ITEM> itemType,
                                                                                           ItemConverter<T,ITEM> itemConverter)

      Gets a builder to create a `SingleSelect`, which uses a `Select` as input component.

      This builder can be used when the selection items type and the selection value type are not consistent (i.e. of different type). When the the selection item and the selection value types are consistent, the `create(Class)` method can be used.

      Type Parameters:
        `T` - Value type
        `ITEM` - Item type
      Parameters:
        `type` - Selection value type (not null)
        `itemType` - Selection items type (not null)
        `itemConverter` - The item converter to use to convert a selection item into a selection (Input) value and back (not null)
      Returns:
        A new `SingleSelectConfigurator.SingleSelectInputBuilder`

    - #### select

          static <T> SingleSelectConfigurator.PropertySingleSelectInputBuilder<T> select(com.holonplatform.core.property.Property<T> selectionProperty)

      Gets a builder to create a `Property` model based `SingleSelect`, which uses a `Select` as input component.
      Type Parameters:
        `T` - Value type
      Parameters:
        `selectionProperty` - The property to use to represent the selection value (not null)
      Returns:
        A new `SingleSelectConfigurator.PropertySingleSelectInputBuilder`

    - #### select

          static <T> SingleSelectConfigurator.PropertySingleSelectInputBuilder<T> select(com.holonplatform.core.property.Property<T> selectionProperty,
                                                                                         Function<T,Optional<com.holonplatform.core.property.PropertyBox>> itemConverter)

      Gets a builder to create a `Property` model based `SingleSelect`, which uses a `Select` as input component.
      Type Parameters:
        `T` - Value type
      Parameters:
        `selectionProperty` - The property to use to represent the selection value (not null)
        `itemConverter` - The function to use to convert a selection value into the corresponding `PropertyBox` item
      Returns:
        A new `SingleSelectConfigurator.PropertySingleSelectInputBuilder`

    - #### filterable

          static <T> FilterableSingleSelectConfigurator.FilterableSingleSelectInputBuilder<T,T> filterable(Class<T> type)

      Gets a builder to create a filterable `SingleSelect`, which uses a `ComboBox` as input component.

      This builder can be used when the selection items type and the selection value type are consistent. Use `create(Class, Class, ItemConverter)` if not.

      Type Parameters:
        `T` - Value type
      Parameters:
        `type` - Selection value type (not null)
      Returns:
        A new `FilterableSingleSelectConfigurator.FilterableSingleSelectInputBuilder`

    - #### filterable

          static <T,ITEM> FilterableSingleSelectConfigurator.FilterableSingleSelectInputBuilder<T,ITEM> filterable(Class<T> type,
                                                                                                                   Class<ITEM> itemType,
                                                                                                                   ItemConverter<T,ITEM> itemConverter)

      Gets a builder to create a filterable `SingleSelect`, which uses a `ComboBox` as input component.

      This builder can be used when the selection items type and the selection value type are not consistent (i.e. of different type). When the the selection item and the selection value types are consistent, the `create(Class)` method can be used.

      Type Parameters:
        `T` - Value type
        `ITEM` - Item type
      Parameters:
        `type` - Selection value type (not null)
        `itemType` - Selection items type (not null)
        `itemConverter` - The item converter to use to convert a selection item into a selection (Input) value and back (not null)
      Returns:
        A new `FilterableSingleSelectConfigurator.FilterableSingleSelectInputBuilder`

    - #### filterable

          static <T> FilterableSingleSelectConfigurator.PropertyFilterableSingleSelectInputBuilder<T> filterable(com.holonplatform.core.property.Property<T> selectionProperty)

      Gets a builder to create a `Property` model based filterable `SingleSelect`, which uses a `ComboBox` as input component.
      Type Parameters:
        `T` - Value type
      Parameters:
        `selectionProperty` - The property to use to represent the selection value (not null)
      Returns:
        A new `FilterableSingleSelectConfigurator.PropertyFilterableSingleSelectInputBuilder`

    - #### filterable

          static <T> FilterableSingleSelectConfigurator.PropertyFilterableSingleSelectInputBuilder<T> filterable(com.holonplatform.core.property.Property<T> selectionProperty,
                                                                                                                 Function<T,Optional<com.holonplatform.core.property.PropertyBox>> itemConverter)

      Gets a builder to create a `Property` model based filterable `SingleSelect`, which uses a `ComboBox` as input component.
      Type Parameters:
        `T` - Value type
      Parameters:
        `selectionProperty` - The property to use to represent the selection value (not null)
        `itemConverter` - The function to use to convert a selection value into the corresponding `PropertyBox` item
      Returns:
        A new `FilterableSingleSelectConfigurator.PropertyFilterableSingleSelectInputBuilder`

    - #### options

          static <T> OptionsSingleSelectConfigurator.OptionsSingleSelectInputBuilder<T,T> options(Class<T> type)

      Gets a builder to create a options `SingleSelect`, which uses a `RadioButtonGroup` as input component.

      This builder can be used when the selection items type and the selection value type are consistent. Use `options(Class, Class, ItemConverter)` if not.

      Type Parameters:
        `T` - Value type
      Parameters:
        `type` - Selection value type (not null)
      Returns:
        A new `OptionsSingleSelectConfigurator.OptionsSingleSelectInputBuilder`

    - #### options

          static <T,ITEM> OptionsSingleSelectConfigurator.OptionsSingleSelectInputBuilder<T,ITEM> options(Class<T> type,
                                                                                                          Class<ITEM> itemType,
                                                                                                          ItemConverter<T,ITEM> itemConverter)

      Gets a builder to create a options `SingleSelect`, which uses a `RadioButtonGroup` as input component.

      This builder can be used when the selection items type and the selection value type are not consistent (i.e. of different type). When the the selection item and the selection value types are consistent, the `options(Class)` method can be used.

      Type Parameters:
        `T` - Value type
        `ITEM` - Item type
      Parameters:
        `type` - Selection value type (not null)
        `itemType` - Selection items type (not null)
        `itemConverter` - The item converter to use to convert a selection item into a selection (Input) value and back (not null)
      Returns:
        A new `OptionsSingleSelectConfigurator.OptionsSingleSelectInputBuilder`

    - #### options

          static <T> OptionsSingleSelectConfigurator.PropertyOptionsSingleSelectInputBuilder<T> options(com.holonplatform.core.property.Property<T> selectionProperty)

      Gets a builder to create a `Property` model based options `SingleSelect`, which uses a `RadioButtonGroup` as input component.
      Type Parameters:
        `T` - Value type
      Parameters:
        `selectionProperty` - The property to use to represent the selection value (not null)
      Returns:
        A new `OptionsSingleSelectConfigurator.PropertyOptionsSingleSelectInputBuilder`

    - #### options

          static <T> OptionsSingleSelectConfigurator.PropertyOptionsSingleSelectInputBuilder<T> options(com.holonplatform.core.property.Property<T> selectionProperty,
                                                                                                        Function<T,Optional<com.holonplatform.core.property.PropertyBox>> itemConverter)

      Gets a builder to create a `Property` model based options `SingleSelect`, which uses a `RadioButtonGroup` as input component.
      Type Parameters:
        `T` - Value type
      Parameters:
        `selectionProperty` - The property to use to represent the selection value (not null)
        `itemConverter` - The function to use to convert a selection value into the corresponding `PropertyBox` item
      Returns:
        A new `OptionsSingleSelectConfigurator.PropertyOptionsSingleSelectInputBuilder`

Copyright © 2019 The Holon Platform. All rights reserved.