I’ve got currently have 2 classes that do exactly the same, and are differentiated by a single member.
interface interfaceA {
VariationA getVariation();
}
interface interfaceB {
VariationB getVariation();
}
public class classC{
private interfaceA interfaceImpl = new interfaceAImpl();
}
public class classD{
private interfaceB interfaceImpl = new interfaceBImpl();
}
I’m looking for an elegant way to unite classA with classB
P.S.,
I have lombok and spring framework capabilities available.