Package calculator

Interface ArithmeticOperation

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface interface ArithmeticOperation
Created for designing custom lambda function for different Arithmetic Operation.
Author:
Shamith Nakka Demonstrates the usage of #executeOperation().
  • Method Summary

    Modifier and Type
    Method
    Description
    operation(Number operand1, Number operand2)
     
  • Method Details

    • operation

      Number operation(Number operand1, Number operand2)
      Parameters:
      operand1 - : Subclass object of Number.
      operand2 - : Subclass object of Number.
      Returns:
      Subclass object of Number class through Reference Widening.