Package com.vaadin.flow.data.binder
Class RequiredFieldConfiguratorUtil
- java.lang.Object
-
- com.vaadin.flow.data.binder.RequiredFieldConfiguratorUtil
-
public class RequiredFieldConfiguratorUtil extends Object
Helper methods used byRequiredFieldConfigurator. The methods are extracted to a separate class to prevent populating the public API of theRequiredFieldConfiguratorinterface.- Since:
- 1.0
- Author:
- Vaadin Ltd
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanhasZeroSize(Object value)Checks whether the given object would be considered empty according to theSizeconstraint.static booleantestConvertedDefaultValue(Binder.BindingBuilder<?,?> binding, Predicate<Object> predicate)Tests the converted default value of the provided binding builder if possible.
-
-
-
Method Detail
-
hasZeroSize
public static boolean hasZeroSize(Object value)
Checks whether the given object would be considered empty according to theSizeconstraint.- Parameters:
value- the value to check- Returns:
- true if the value is supported by the size constraint, otherwise
false
-
testConvertedDefaultValue
public static boolean testConvertedDefaultValue(Binder.BindingBuilder<?,?> binding, Predicate<Object> predicate)
Tests the converted default value of the provided binding builder if possible.- Parameters:
binding- the binding builder to testpredicate- predicate for testing the converted default value- Returns:
trueif a converted default value is available and it passes the test;falseif no converted default value is available or if it doesn't pass the test
-
-