Given a Java interface
interface Value {
Value add(Value argument);
}
(since Java does not support symbols like + as method names), is it possible to define an alias method +
to alias add
such that, when the class is used from Scala one can write
result = value1 + value2
instead of
result = value1.add(value2)
or
result = value1 add value2
The alias should apply automatically to all classes implementing the interface.