Class FieldPredicate


  • public final class FieldPredicate
    extends Object
    This class is used to create field predicates. It has methods that allow to create common predicates e.g. accept all fields.
    Since:
    0.1.0
    Author:
    Piotr JoĊ„ski
    • Method Detail

      • includeAllFields

        public static Predicate<String> includeAllFields​(Class<?> clazz)
        Creates Predicate that accepts all fields of specified class.
        Parameters:
        clazz - class, which fields will be accepted
        Returns:
        Predicate that accepts all fields of given class
        See Also:
        Predicate
      • include

        public static Predicate<String> include​(List<String> includedFields)
        Creates Predicate that accepts given fields.
        Parameters:
        includedFields - fields, that will be included into predicate
        Returns:
        Predicate that accepts given fields
        See Also:
        Predicate
      • include

        public static Predicate<String> include​(String... includedFields)
        Creates Predicate that accepts given fields.
        Parameters:
        includedFields - fields, that will be included into predicate
        Returns:
        Predicate that accepts given fields
        See Also:
        Predicate
      • exclude

        public static Predicate<String> exclude​(List<String> excludedFields)
        Creates Predicate that rejects given fields.
        Parameters:
        excludedFields - fields, that will be excluded from predicate
        Returns:
        Predicate that rejects given fields
        See Also:
        Predicate
      • exclude

        public static Predicate<String> exclude​(String... excludedFields)
        Creates Predicate that rejects given fields.
        Parameters:
        excludedFields - fields, that will be excluded from predicate
        Returns:
        Predicate that rejects given fields
        See Also:
        Predicate