Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

发现一个内容的链接失效了,Individual类相关代码找不到 #552

Open
XanderTiger opened this issue Aug 28, 2020 · 0 comments
Open

Comments

@XanderTiger
Copy link

@XanderTiger XanderTiger commented Aug 28, 2020

第十九章 类型信息

如下链接失效,导致Individual类相关代码找不到
https://github.com/LingCoder/OnJava8/blob/master/docs/book/Appendix-Collection-Topics

附录:容器的链接失效

如下内容:

一般,可能想要查找某种类型(比如要找三角形,并填充为紫色),这时可以轻松地使用 instanceof 来度量所有对象。举个例子,假如你有一个类的继承体系,描述了 Pet(以及它们的主人,在后面一个例子中会用到这个特性)。在这个继承体系中的每个 Individual 都有一个 id 和一个可选的名字。尽管下面的类都继承自 Individual,但是 Individual 类复杂性较高,因此其代码将放在附录:容器中进行解释说明。正如你所看到的,此处并不需要去了解 Individual 的代码——你只需了解你可以创建其具名或不具名的对象,并且每个 Individual 都有一个 id() 方法,如果你没有为 Individual 提供名字,toString() 方法只产生类型名。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.