As for the suggested names, it depends on how you want to go. Some existing examples:
interface Codec <I, O> {
public O encode(I in);
public I decode(O out);
}
interface Format <R, F> {
public F format(R raw);
public R parse(F formatted);
}
If you want it to be super generic, I would just use aToBand bToA, as you suggested. Do not overload them since you use Generics, and do not use toA, because you do not convert this function, you convert the argument.
source
share