Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Reverse binary operator overload #25
Comments
|
Implemented in JavaC7,8-oo-plugin 0.5, idea-oo-plugin 0.4 |
|
That's really useful! |
|
Implemented in eclipse-oo-plugin 0.5 |
Use case - multiply double to Complex:
We can't add method
multiplyto double.Solution:
add method
Complex#multiplyRev(double)This method will be used on second operand in cases where is no multiply method in left operand.
So:
1.2 * awill be transformed toa.multiplyRev(1.2)This should work for every binary operator.