With your simple class defined, let's look at how you use the class in Ceylon.
既然定义了简单的类,我们来看看如何在Ceylon中使用这个类。
Listing 8 shows a simple class that does five things, two of which are important.
清单8显示了一个简单的类,它一共做了5件事,其中有2件是很重要的。
The simple class in Listing 4 serves as a starting point for all of your Tapestry objects.
清单4中的简单示例可以充当所有Tapestry对象的起点。
Please note that this is a very simple class, with preconditions on almost all its functions.
请注意,它是一个非常简单的类,几乎所有函数都有前置条件。
In this section, we'll describe a simple class that we can use in solving our bookstore problem.
在这一节,我们将描述一个用于解决书店问题的简单类。
ClassA is a simple class with no implementation, while ClassB shows minimal details to illustrate the point.
ClassA是没有实现的简单类,而ClassB显示了阐明要点所需的最少细节。
Listing 7 demonstrates the use of the Formattable interface by providing a simple class with a name property.
清单7演示了通过提供一个具有name属性的简单类来使用Formattable接口。
This simple class holds configurable items for a Web application — for example, the path to the images directory.
这个简单的类中含有用于Web应用程序的配置项——例如,指向图片目录的路径。
Let's take a look at a simple class definition to which we will add and remove attributes. Here is the initial definition.
让我们看一个简单的类的定义,我们将向其添加和除去一些属性。
Listing 11 shows a simple class implementing the Comparator interface to sort records based on comparing the string contents of each record.
清单11展示了一个实现了Comparator接口的简单类,它通过比较每条记录的字符串内容对记录进行排序。
This is a fairly simple class that lets me maintain a list of todos in another object called a TodoCollection. I can instantiate my collection.
这是一个相当简单的类,它允许我在另一个名为TodoCollection的对象中维护todo列表。
This simple class lets you develop the GUI and later, with slight modification, test the GUI with the real JSON service after you develop the display logic.
这个简单的类让我们可以开发GUI;在开发显示逻辑之后,只需经过简单的修改,就可以用真正的JSON服务测试GUI。
Noting that the inputs and outputs of the Fuzzy Controller are non- fuzzy, this paper presents a new and simple class of reasoning and decision algorithms.
本文针对模糊控制器输入输出是确定量的特点,提出一类新的简单的推理决策算法。
In the simple class diagram of Figure 1, you can see that the two classes share a few relationships (just bear with me if all this complexity seems contrived: it serves a purpose!)
在图1所示的简单类图中,可以看出这两个类有几个关系(如果这种复杂性看起来不自然,请忍耐一下;这是有意义的!)
In the simple class diagram of Figure 1, you can see that the two classes share a few relationships (just bear with me if all this complexity seems contrived: it serves a purpose!)
在图1所示的简单类图中,可以看出这两个类有几个关系(如果这种复杂性看起来不自然,请忍耐一下;这是有意义的!)
应用推荐