Like all the cool languages, Scala also supports implementation inheritance (see Resources).
与所有杰出的语言一样,Scala也支持实现继承(参见参考资料)。
Because interfaces do not support implementation inheritance, the pattern that applies to classes does not apply to interfaces.
由于接口不能支持继承,用于类的模式不能用于接口。
This silence is odd, considering that there is a simple mechanism in XML Schema that can be used to provide the same effect as implementation inheritance: the extension mechanism.
这种沉默是暂时的,因为XMLSchema中有一种简单的机制可以用来达到与实现继承同样的目的:扩展机制。
However, multiple inheritance being used only for interface implementation was thought to alleviate this problem somewhat.
不过,多重继承只能用在被认为可以减轻这一问题的接口实现中。
As shown in Figure 10, a dotted line with a closed, unfilled arrow means realization (or implementation); as we saw in Figure 4, a solid arrow line with a closed, unfilled arrow means inheritance.
如图10所示,一条带有闭合的单向箭头的点线意味着实现(或实施);正如我们在图4中所见到的,一条带有闭合单向箭头的实线表示继承。
A mechanism for treating different implementations as logically "the same kind of thing" - usually polymorphism is implemented via interface implementation and class inheritance.
l一种逻辑上做相同事情,但却有不同实现的机制。我们通常称之为多态机制。
When the implementation of the steps may need to vary at run time. Concrete inheritance can't accommodate this; delegation can.
当这个实现的步骤需要在运行时变化。类继承不能适应这个,代理能。
The current implementation lacks some functionality to which RTOS users are accustomed, such as priority inheritance (to prevent priority inversion) and task deletion safety.
目前执行缺乏一些功能,其中的RTOS用户习惯,如优先级继承(以防止优先级反转)和任务,删除安全。
You should still call the base implementation in case an intermediate class in the inheritance has implemented this method.
如果继承中的中间类已实现了此方法,则仍应调用基实现。
Because an intermediate class in the inheritance might implement this method, we recommend that you call the base implementation in your implementation.
由于继承中的中间类可能会实现此方法,因此我们建议您在实现中调用基实现。
Method implementation: A specific class's implementation of a method that is inherited using interface inheritance.
方法实作:特定类别的方法实作,这个方法是透过介面继承而继承的。
Method implementation: A specific class's implementation of a method that is inherited using interface inheritance.
方法实作:特定类别的方法实作,这个方法是透过介面继承而继承的。
应用推荐