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 ofHasValuethat may optionally allownullas value. By default, objects should not allownulls. In general, when this feature is turned on andHasValue.setValue(Object)is called withnull, the object should never throw aNullPointerException.- 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisNullValueAllowed()Checks whethernullis allowed as a value of the component.voidsetNullValueAllowed(boolean allowingNullValue)Sets allowance ofnullas this component's value.
-
-
-
Method Detail
-
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.
-
-