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.
请注意,它是一个非常简单的类,几乎所有函数都有前置条件。
Now let's begin our example by creating a simple class that we can exercise in our test scenarios.
现在,让我们建立一个测试场景的简单的类,来开始我们的示例。
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接口。
For now, let's take a look at a simple class instance. To begin, we created a Python module named persist.py.
现在,我们看一个简单的类实例。
This DeclarativeMeta type is the magic that allows all of the actions to occur in one simple class definition.
这个declarativemeta类型的魔力就是允许所有操作发生在一个简单的类定义中。
Document your code - Whether its documenting a Web Service API or documenting a simple class, document as you go.
编写文档。无论是Web服务的API,还是一个简单的类,你尽量编写相应文档。
This simple class holds configurable items for a Web application — for example, the path to the images directory.
这个简单的类中含有用于Web应用程序的配置项——例如,指向图片目录的路径。
Notice how the analysis is performed, and you start seeing more information about the simple class diagram you created.
注意一下如何执行分析的,而且你开始看到更多关于你创建好的简单类图的信息。
Let's take a look at a simple class definition to which we will add and remove attributes. Here is the initial definition.
让我们看一个简单的类的定义,我们将向其添加和除去一些属性。
The theory of finite automata is the mathematical theory of a simple class of algorithms that are important in computer science.
有限自动机理论是一类简单类算法的数学理论,这些算法理论这些数学虽然简单但对计算机科学很重要。
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列表。
If you're writing a simple class to represent currency, it's easy to test that you can add $1.23 to $2.28 and get $4.03 and not $3.03 or $4.029999998.
如果要编写一个代表货币值的简单的类,那么很容易测试把 $1.23和 $2.8 相加是否能够得出 $4.03,而不是 $3.03 或 $4.029999998。
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所示的简单类图中,可以看出这两个类有几个关系(如果这种复杂性看起来不自然,请忍耐一下;这是有意义的!)
This has nothing to do with class or etiquette, but concerns the simple issue of positioning.
这与阶级或礼仪无关,只是涉及到简单的定位问题。
You feel that a custom metaclasses is overkill for the simple job of class initialization, and you would rather use a simpler solution.
您觉得对于类初始化这类简单的工作使用自定义元类是杀鸡用牛刀,所以想要使用一种更为简单的解决方案。
For instance, Listing 6 shows a simple (PHP V4) class and instances.
例如,清单6显示了简单的(PHPV 4)类和实例。
The idea is to keep the controller class as simple as possible to allow business logic to be abstracted to a helper class.
这个想法是为了使控制器类尽可能保持简单以允许业务逻辑被抽象为助手类。
A simple utility class is created to easily get the instance of the async remote interface (lines 7-13 in Listing 8).
通过创建简单的实用程序类很容易获得异步远程接口的实例(清单8中的第7 - 13行)。
In Listing 6, I solved this problem by creating a simple Book class that inherits from DBObject.
在清单6中,通过创建一个继承自dbobject的简单book类,我解决了这个问题。
The minimal CloudCrowd action is a simple Ruby class that defines a "process" method, performing the parallel part of the computation and saving it to S3.
最小的CloudCrowdaction是一个简单的Ruby类,它被用来定义一个“进程”方法,执行计算中的并行部分,并保存到S3。
However, for the purpose of this example we used a simple DataBase class and populated it with answers given by members of the survey group.
不过,为了配合这个例子,我们使用简单的database类,并使用调查组成员给出的答案填充它。
However, for the purpose of this example we used a simple DataBase class and populated it with answers given by members of the survey group.
不过,为了配合这个例子,我们使用简单的database类,并使用调查组成员给出的答案填充它。
应用推荐