I have a hierarchy of interfaces, with Child implementing Parent. I would like to work with immutable objects, so I would like to design Bui
Child
Parent
Bui
Use generics, as follows:
public interface Parent { public Long getParentProperty(); } public interface Child { public T getChildProperty(); }
Then instead of Child1, use Child and instead of Child2, use Child.