Interface Remote.BinaryOperator<T>

Type Parameters:
T - the type of the operands and result of the operator
All Superinterfaces:
BiFunction<T,T,T>, BinaryOperator<T>, Remote.BiFunction<T,T,T>, Serializable
Enclosing class:
Remote
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface Remote.BinaryOperator<T> extends Remote.BiFunction<T,T,T>, BinaryOperator<T>, Serializable
Represents an operation upon two operands of the same type, producing a result of the same type as the operands. This is a specialization of Remote.BiFunction for the case where the operands and the result are all of the same type.

This is a functional interface whose functional method is BiFunction.apply(Object, Object).

See Also:
  • Method Details

    • 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