I have a interface
public interface Doable<T,U> {
public U doStuff(T t);
}
I have an abstract class which implements Doable<T,U>
public abstract class AbstractDoable<T,U> implements Doable<T, U> {
private SomeClass someClass;
}
Now I need to implement the above classes, but I need to use different classes for T
and U
.
Please suggest how should I proceed in this as I will need to have multiple implemetations of AbstractDoable
with different T
and U
. For example:
ConvertDoable<String,Integer> extends AbstractDoable
or
ConvertDoable<A,B> extends AbstractDoable
public class ConvertDoable