I have a Java generics question I was hoping someone could answer. Consider the following code:
public interface Event{}
public class AddressChanged implemen
Unfortunately not. The usual solution (fat, ugly, fast) is to create one Handles
interface (i.e. HandlesAddressChange
, HandlesAddressDiscarded
) and give each of them a different method (handleAddressChange(...)
, handleAddressDiscarded()
).
That way, the Java runtime can tell them apart.
Or you can use anonymous classes.