Class FunctionParameterTypePredicate<T>

  • Type Parameters:
    T - Parameter type
    All Implemented Interfaces:
    java.util.function.Predicate<T>

    public class FunctionParameterTypePredicate<T>
    extends java.lang.Object
    implements java.util.function.Predicate<T>
    Predicate used to validate function parameter types
    • Constructor Summary

      Constructors 
      Constructor Description
      FunctionParameterTypePredicate​(boolean allowBooleans, boolean allowComparables, boolean allowDateTimeTypes, boolean allowEnums, boolean allowNulls, boolean allowNumbers, boolean allowStrings)
      Constructor sets state flags
    • Constructor Detail

      • FunctionParameterTypePredicate

        public FunctionParameterTypePredicate​(boolean allowBooleans,
                                              boolean allowComparables,
                                              boolean allowDateTimeTypes,
                                              boolean allowEnums,
                                              boolean allowNulls,
                                              boolean allowNumbers,
                                              boolean allowStrings)
        Constructor sets state flags
        Parameters:
        allowBooleans - Flag defines whether boolean values are allowed or not
        allowComparables - Flag defines whether comparable values are allowed or not
        allowDateTimeTypes - Flag defines whether datetime values are allowed or not
        allowEnums - Flag defines whether enum values are allowed or not
        allowNulls - Flag defines whether null values are allowed or not
        allowNumbers - Flag defines whether numeric values are allowed or not
        allowStrings - Flag defines whether string values are allowed or not
    • Method Detail

      • test

        public boolean test​(T value)
        Specified by:
        test in interface java.util.function.Predicate<T>
        Parameters:
        value - Function parameter to test
        Returns:
        True when parameter is valid, false otherwise