多接口继承 (Multiple Interface Inheritance)是指一个类型可以继承多个接口,而接口是类之间互交的一个抽象,把类之间需要互交的内容抽象出来定义成接口,可以更好地控制类之...
基于20个网页-相关网页
Granted, multiple interface inheritance would allow us to construct a corresponding set of interfaces, but the classes implementing these interfaces couldn't follow the structure directly.
就算多重接口继承允许我们构造对应的接口集,但是实现这些接口的类不能直接遵循该结构。
However, multiple inheritance being used only for interface implementation was thought to alleviate this problem somewhat.
不过,多重继承只能用在被认为可以减轻这一问题的接口实现中。
Offering both an interface and an abstract class is redundant, but I find it convenient: in most cases, I only need the abstract class, but the interface enables multiple inheritance.
同时提供接口和抽象类是多余的,但我发现这样很方便:在大多数情况下,我只需要抽象类,但接口支持多继承性。
应用推荐