In Java what's the "correct" way to implement an interface where the parameters for a method need parametric polymorphism?
For example, my interface contains:
public int addItem(Object dto);
The interface is implemented by various classes but in each the dto parameter is one of various strongly typed objects such as planeDTO, trainDTO or automobileDTO.
For example, in my planeDAO class:
public int addItem(planeDTO dto) { ... }
Do I simply implement with the dto parameter as Object and then cast to the appropriate type?