com.vaadin.ui.

Interface ComboBox.NewItemProvider<T>

  • All Superinterfaces:

    Function<String,​Optional<T>>, Serializable, SerializableFunction<String,​Optional<T>>

    Enclosing class:

    ComboBox<T>

    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 static interface ComboBox.NewItemProvider<T>
    extends SerializableFunction<String,​Optional<T>>

    Provider function that adds a new item based on user input when the new items allowed mode is active. After the new item handling is complete, this function should return Optional.of(text) for the completion of automatic selection handling. If automatic selection is not wished for, always return Optional.isEmpty().

    Since:

    8.4