Interface TCEBinaryOperator<T>

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

@FunctionalInterface @ClassVersion(sourceVersion="$Id: TCEBinaryOperator.java 993 2022-01-19 22:26:20Z tquadrat $") @API(status=STABLE, since="0.0.5") public interface TCEBinaryOperator<T> extends TCEBiFunction<T,T,T>
The TCE version of the interface BinaryOperator that represents an operation upon two operands of the same type, producing a result of the same type as the operands. This is a specialisation of BiFunction for the case where the operands and the result are all the same type.

Different from the method BinaryOperator.apply() the method apply(Object,Object) of this interface declares to throw a checked exception.

This is a functional interface whose functional method is apply(Object,Object).
Author:
Thomas Thrien (thomas.thrien@tquadrat.org)
Version:
$Id: TCEBinaryOperator.java 993 2022-01-19 22:26:20Z tquadrat $
Since:
0.0.5
UML Diagram
UML Diagram for "org.tquadrat.foundation.function.tce.TCEBinaryOperator"

UML Diagram for "org.tquadrat.foundation.function.tce.TCEBinaryOperator"

UML Diagram for "org.tquadrat.foundation.function.tce.TCEBinaryOperator"
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(T arg1, T arg2)
    Applies this function to the given arguments.
  • Method Details

    • apply

      T apply(T arg1, T arg2) throws Exception
      Applies this function to the given arguments.
      Specified by:
      apply in interface TCEBiFunction<T,T,T>
      Parameters:
      arg1 - The first function argument.
      arg2 - The second function argument.
      Returns:
      The function result.
      Throws:
      Exception - Something went wrong.