Package org.vaadin.miki.markers
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 TypeMethodDescriptionbooleanChecks whethernullis allowed as a value of the component.voidsetNullValueAllowed(boolean allowingNullValue) Sets allowance ofnullas 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 whethernullis allowed as a value of the component.- Returns:
- Whether
nullis allowed as a value. Should default tofalse.
-
setNullValueAllowed
void setNullValueAllowed(boolean allowingNullValue) Sets allowance ofnullas this component's value.- Parameters:
allowingNullValue- Whether to allownullas a value.
-