3 ms·
You can do that partially. Because of the sub-classing and covariant return-types, I think you cannot prevent a CustomCollection from returning a CustomList. Th
by eonwe 12y ago
You can do that partially. Because of the sub-classing and covariant return-types, I think you cannot prevent a CustomCollection from returning a CustomList. The definition would be:
public interface Mappable<T extends Mappable<T>> {
T map();
}