Class FunctionUtils



  • @API(status=INTERNAL,
         since="1.0")
    public final class FunctionUtils
    extends java.lang.Object
    Collection of utilities for working with Functions, Predicates, etc.

    DISCLAIMER

    These utilities are intended solely for usage within the JUnit framework itself. Any usage by external parties is not supported. Use at your own risk!

    Since:
    1.0
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T,V> java.util.function.Predicate<T> where​(java.util.function.Function<T,V> function, java.util.function.Predicate<? super V> predicate)
      Return a predicate that first applies the specified function and then tests the specified predicate against the result of the function.
      • Methods inherited from class java.lang.Object

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

      • where

        public static <T,V> java.util.function.Predicate<T> where​(java.util.function.Function<T,V> function,
                                                                  java.util.function.Predicate<? super V> predicate)
        Return a predicate that first applies the specified function and then tests the specified predicate against the result of the function.
        Parameters:
        function - the function to apply
        predicate - the predicate to test against the result of the function