这还不利于域类的设计,因为这个实用类现在必须位于对象层次结构的顶层,不允许您使用继承来整合常见行为。
It also hurts the design of your domain classes because this utility class must now sit at the top of your object hierarchy, not allowing you to use inheritance to consolidate common behavior.
实现层次结构在Scala中的效果是相同的:我们可以向方法应用final来防止子类覆盖它,也可应用于类声明本身来防止继承。
Implementation hierarchy works the same way in Scala: We can apply final to the method to prevent a child class from overriding it or to the class declaration itself to prevent derivatives.
我们还看到所有这些对象都可以包含多个TAG/DataElement,因为该组合是在对象继承层次结构的父类(DICOMData)中表示的。
We also see that all these objects can contain a number of TAG/DataElements since this composition is represented at the parent of the object inheritance hierarchy (DICOMData).
由于类模板与继承的结合,产生了所谓的类模板的层次结构。
Hierarchy of class template is generated due to the combination of class template and inheritance.
它以类为基础,并根据类的层次结构和继承关系用链表来构造规则库。
On the basis of class and in accordance with the level structure and the inheritance relation of class, a rule base is constructed by using linked lists.
类的成员包括在类中声明的所有成员,以及在该类的继承层次结构中的所有类中声明的所有成员(构造函数和析构函数除外)。
A class's members include all the members declared in the class, along with all members (except constructors and destructors) declared in all classes in its inheritance hierarchy.
获取管理类的名称,在该类中第一次将该方法引入到类的继承层次结构。
Gets the name of the management class in which the method was first introduced in the class inheritance hierarchy.
但是,如果此类是可继承的,且之前已经有派生类的层次结构,则这些派生类可能需要访问此数据或代码。
However, if the class is inheritable and you expect a hierarchy of derived classes, it might be necessary for these derived classes to access the data or code.
但是,如果此类是可继承的,且之前已经有派生类的层次结构,则这些派生类可能需要访问此数据或代码。
However, if the class is inheritable and you expect a hierarchy of derived classes, it might be necessary for these derived classes to access the data or code.
应用推荐