Interface HasNullValueOptionallyAllowed<E extends com.vaadin.flow.component.HasValue.ValueChangeEvent<V>,V>

Type Parameters:
E - Event type.
V - Value type.
All Superinterfaces:
com.vaadin.flow.component.HasValue<E,V>, Serializable
All Known Subinterfaces:
WithNullValueOptionallyAllowedMixin<SELF,E,V>
All Known Implementing Classes:
AbstractSuperFloatingPointField, AbstractSuperNumberField, SuperBigDecimalField, SuperDoubleField, SuperIntegerField, SuperLongField

public interface HasNullValueOptionallyAllowed<E extends com.vaadin.flow.component.HasValue.ValueChangeEvent<V>,V> extends com.vaadin.flow.component.HasValue<E,V>
Marker interface for descendants of HasValue that may optionally allow null as value. By default, objects should not allow nulls. In general, when this feature is turned on and HasValue.setValue(Object) is called with null, the object should never throw a NullPointerException.
Since:
2021-09-13
Author:
miki
  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.vaadin.flow.component.HasValue

    com.vaadin.flow.component.HasValue.ValueChangeEvent<V extends Object>, com.vaadin.flow.component.HasValue.ValueChangeListener<E extends com.vaadin.flow.component.HasValue.ValueChangeEvent<?>>
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Checks whether null is allowed as a value of the component.
    void
    setNullValueAllowed(boolean allowingNullValue)
    Sets allowance of null as this component's value.

    Methods inherited from interface com.vaadin.flow.component.HasValue

    addValueChangeListener, clear, getEmptyValue, getOptionalValue, getValue, isEmpty, isReadOnly, isRequiredIndicatorVisible, setReadOnly, setRequiredIndicatorVisible, setValue
  • Method Details

    • isNullValueAllowed

      boolean isNullValueAllowed()
      Checks whether null is allowed as a value of the component.
      Returns:
      Whether null is allowed as a value. Should default to false.
    • setNullValueAllowed

      void setNullValueAllowed(boolean allowingNullValue)
      Sets allowance of null as this component's value.
      Parameters:
      allowingNullValue - Whether to allow null as a value.