In Listing 9, I've created a person class to represent the person element defined in Listing 6.
在清单9中,我已经创建了一个Person类来表示在清单6中定义的person元素。
They perfectly retain the semantics of the POJO while drastically reducing the amount of code you need to write. Listing 9 shows a "shorthand" person class written in Groovy
它们完全保留了 POJO 的语义,同时显著减少了需要编写的代码量。
For example, in Figure 3 the solid diamond indicates that the relationship is a composition — in other words, that instances of the address class can only exist within the context of a person class.
比如,图3中的实心菱形表示这里是组合关系——换句话说,address类的实例只能存在于person类的上下文中。
so it's a 250-person class, but we have a group of 50 that we go around with quite a bit.
这是一门250人的课,但是我们组成50人一组一起学习。
Yeah. If you were going to marry somebody from this class, it is the person you are sitting next to?
如果要你和这个班上的某个同学结婚,那会是坐在你旁边的那个人?
We are going to be in a conference room not far from here, and we are going to be reviewing every person's performance in this class.
我们将会在一间会议室里,离这不远,我们会开始,回顾每一位同学课堂上的表现。
应用推荐