Class RequiredFieldConfiguratorUtil

    • Method Detail

      • hasZeroSize

        public static boolean hasZeroSize​(Object value)
        Checks whether the given object would be considered empty according to the Size constraint.
        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 test
        predicate - predicate for testing the converted default value
        Returns:
        true if a converted default value is available and it passes the test; false if no converted default value is available or if it doesn't pass the test