Interface IHCSelect<IMPLTYPE extends IHCSelect<IMPLTYPE>>

    • Method Detail

      • isMultiple

        boolean isMultiple()
      • getSize

        int getSize()
      • getAllPreselectedValues

        @Nonnull
        @ReturnsMutableCopy
        com.helger.commons.collection.impl.ICommonsSet<String> getAllPreselectedValues()
      • isPreselectedValue

        boolean isPreselectedValue​(@Nullable
                                   String sValue)
      • addOptionAt

        @Nonnull
        HCOption addOptionAt​(@Nonnegative
                             int nIndex,
                             @Nonnull
                             HCOption aOption)
        Add a new option at the specified index.
        Parameters:
        nIndex - The index to use. Should be ≥ 0.
        aOption - The option to be added. May not be null.
        Returns:
        this for chaining
      • addOptionAt

        @Nonnull
        default HCOption addOptionAt​(@Nonnegative
                                     int nIndex,
                                     @Nullable
                                     String sValue,
                                     @Nullable
                                     String sText)
        Add a new option at the specified index.
        Parameters:
        nIndex - The index to use. Should be ≥ 0.
        sValue - The value of the option to be added. May be null.
        sText - The text of the option to be added. May be null.
        Returns:
        this for chaining
      • removeOptionAt

        @Nonnull
        IMPLTYPE removeOptionAt​(@Nonnegative
                                int nIndex)
        Remove the option at the specified index.
        Parameters:
        nIndex - The index to be removed. Should be ≥ 0.
        Returns:
        this for chaining
      • removeOptionGroupAt

        @Nonnull
        IMPLTYPE removeOptionGroupAt​(@Nonnegative
                                     int nIndex)
        Remove the option group at the specified index.
        Parameters:
        nIndex - The index to be removed. Should be ≥ 0.
        Returns:
        this for chaining
      • getOptionCount

        @Nonnegative
        int getOptionCount()
        Returns:
        The number of available options.
      • getOptionGroupCount

        @Nonnegative
        int getOptionGroupCount()
        Returns:
        The number of available option groups.
      • getAllOptions

        @Nonnull
        @ReturnsMutableCopy
        com.helger.commons.collection.impl.ICommonsList<HCOption> getAllOptions()
        Returns:
        A non-null list of all available options.
      • getAllOptionGroups

        @Nonnull
        @ReturnsMutableCopy
        com.helger.commons.collection.impl.ICommonsList<HCOptGroup> getAllOptionGroups()
        Returns:
        A non-null list of all available option groups.
      • getOptionAtIndex

        @Nullable
        HCOption getOptionAtIndex​(@Nonnegative
                                  int nIndex)
        Get the option at the specified index
        Parameters:
        nIndex - The index to retrieve. Should always be ≥ 0.
        Returns:
        null if no option is available for the specified index.
      • getOptionGroupAtIndex

        @Nullable
        HCOptGroup getOptionGroupAtIndex​(@Nonnegative
                                         int nIndex)
        Get the option group at the specified index
        Parameters:
        nIndex - The index to retrieve. Should always be ≥ 0.
        Returns:
        null if no option group is available for the specified index.
      • hasOptions

        boolean hasOptions()
        Returns:
        true if this select has at least one option.
      • hasOptionGroups

        boolean hasOptionGroups()
        Returns:
        true if this select has at least one option group.
      • getAllSelectedOptions

        @Nonnull
        @ReturnsMutableCopy
        com.helger.commons.collection.impl.ICommonsList<HCOption> getAllSelectedOptions()
        Returns:
        A non-null list of all selected options.
      • getFirstSelectedOption

        @Nullable
        HCOption getFirstSelectedOption()
        Returns:
        The first selected option. May be null.
      • getFirstSelectedOptionValue

        @Nullable
        default String getFirstSelectedOptionValue()
      • getSelectedOptionCount

        @Nonnegative
        int getSelectedOptionCount()
        Returns:
        The number of selected options. Always ≥ 0.
      • hasSelectedOption

        boolean hasSelectedOption()
        Check if this select has at least one selected option
        Returns:
        true if at least one option is selected