Interface Remote.BinaryOperator<T>

    • Method Detail

      • minBy

        static <T,​E extends Comparable<? super E>> Remote.BinaryOperator<T> minBy​(ValueExtractor<? super T,​? extends E> comparable)
        Returns a Remote.BinaryOperator which returns the lesser of two elements according to the specified Comparable value.
        Type Parameters:
        T - the type of the input arguments of the comparator
        Parameters:
        comparable - a Comparator for comparing the two values
        Returns:
        a BinaryOperator which returns the greater of its operands, according to the supplied Comparator
        Throws:
        NullPointerException - if the argument is null
      • minBy

        static <T> Remote.BinaryOperator<T> minBy​(Remote.Comparator<? super T> comparator)
        Returns a Remote.BinaryOperator which returns the lesser of two elements according to the specified Comparator.
        Type Parameters:
        T - the type of the input arguments of the comparator
        Parameters:
        comparator - a Comparator for comparing the two values
        Returns:
        a BinaryOperator which returns the lesser of its operands, according to the supplied Comparator
        Throws:
        NullPointerException - if the argument is null
      • minBy

        static <T> Remote.BinaryOperator<T> minBy​(Comparator<? super T> comparator)
        Returns a Remote.BinaryOperator which returns the lesser of two elements according to the specified Comparator.
        Type Parameters:
        T - the type of the input arguments of the comparator
        Parameters:
        comparator - a Comparator for comparing the two values
        Returns:
        a BinaryOperator which returns the lesser of its operands, according to the supplied Comparator
        Throws:
        NullPointerException - if the argument is null
      • maxBy

        static <T,​E extends Comparable<? super E>> Remote.BinaryOperator<T> maxBy​(ValueExtractor<? super T,​? extends E> comparable)
        Returns a Remote.BinaryOperator which returns the greater of two elements according to the specified Comparable value.
        Type Parameters:
        T - the type of the input arguments of the comparator
        Parameters:
        comparable - a Comparator for comparing the two values
        Returns:
        a BinaryOperator which returns the greater of its operands, according to the supplied Comparator
        Throws:
        NullPointerException - if the argument is null
      • maxBy

        static <T> Remote.BinaryOperator<T> maxBy​(Remote.Comparator<? super T> comparator)
        Returns a Remote.BinaryOperator which returns the greater of two elements according to the specified Comparator.
        Type Parameters:
        T - the type of the input arguments of the comparator
        Parameters:
        comparator - a Comparator for comparing the two values
        Returns:
        a BinaryOperator which returns the greater of its operands, according to the supplied Comparator
        Throws:
        NullPointerException - if the argument is null
      • maxBy

        static <T> Remote.BinaryOperator<T> maxBy​(Comparator<? super T> comparator)
        Returns a Remote.BinaryOperator which returns the greater of two elements according to the specified Comparator.
        Type Parameters:
        T - the type of the input arguments of the comparator
        Parameters:
        comparator - a Comparator for comparing the two values
        Returns:
        a BinaryOperator which returns the greater of its operands, according to the supplied Comparator
        Throws:
        NullPointerException - if the argument is null
      • mapMerger

        static <K,​V,​M extends Map<K,​V>> Remote.BinaryOperator<M> mapMerger​(Remote.BinaryOperator<V> mergeFunction)
        BinaryOperator<Map> that merges the contents of its right argument into its left argument, using the provided merge function to handle duplicate keys.
        Type Parameters:
        K - type of the map keys
        V - type of the map values
        M - type of the map
        Parameters:
        mergeFunction - A merge function suitable for Map.merge()
        Returns:
        a merge function for two maps
      • mapMerger

        static <K,​V,​M extends Map<K,​V>> Remote.BinaryOperator<M> mapMerger​(BinaryOperator<V> mergeFunction)
        BinaryOperator<Map> that merges the contents of its right argument into its left argument, using the provided merge function to handle duplicate keys.
        Type Parameters:
        K - type of the map keys
        V - type of the map values
        M - type of the map
        Parameters:
        mergeFunction - A merge function suitable for Map.merge()
        Returns:
        a merge function for two maps