Class XFunctionalUtils


  • public final class XFunctionalUtils
    extends Object
    Utilities related to java.util.function
    Since:
    8.0.4
    Author:
    XIMA MEDIA GmbH
    • Method Detail

      • takeFirst

        public static <R> BinaryOperator<R> takeFirst()
        A binary operator that returns its first argument, useful e.g. for map merge functions.
        Type Parameters:
        R - Type of the items.
        Returns:
        A binary operator returning its first argument and discarding its second argument.
      • takeSecond

        public static <R> BinaryOperator<R> takeSecond()
        A binary operator that returns its second argument, useful e.g. for map merge functions.
        Type Parameters:
        R - Type of the items.
        Returns:
        A binary operator returning its second argument and discarding its first argument.