The disadvantage of using instanceof checks in this fashion is that, if we were to add another subclass of Tree (such as, a LeafWithValue class), we would have to revise these instanceof checks.
以这种方式使用instance of检查语句的一个缺点是,如果我们要添加Tree的另一个子类(比如一个leafwithvalue类),我们将不得不修改这些instance of检查语句。
The tree class represents a tree and is a subclass of Basetree.
树以tree类表示,这个类是Basetree的子类。
Ontology can be viewed as a tree structure. Concepts comprise of class and subclass, the relationships between which are tree's edges.
一个本体可以抽象为一个树状结构,概念由类与子类构成,类与子类之间的关系是树中的边。
应用推荐