Class FunctionalUtils


  • public final class FunctionalUtils
    extends java.lang.Object
    Utilities for working with functions, predicates, etc.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> java.util.function.Predicate<T> alwaysTrue()
      Returns a Predicate that always returns true.
      static <T> java.util.function.Predicate<T> not​(java.util.function.Predicate<T> predicate)
      Negates a Predicate.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • not

        public static <T> java.util.function.Predicate<T> not​(java.util.function.Predicate<T> predicate)
        Negates a Predicate.
        Type Parameters:
        T - Value type of the predicate.
        Parameters:
        predicate - Predicate to negate.
        Returns:
        Returns a predicate that negates the given predicate.
      • alwaysTrue

        public static <T> java.util.function.Predicate<T> alwaysTrue()
        Returns a Predicate that always returns true.
        Type Parameters:
        T - Value that the predicate accepts.
        Returns:
        Returns the predicate.