所谓trait就是可以包含实现的接口。
Simply put, traits are interfaces, which can contain an implementation.
分布类中是否重新声明它所实现的接口也是可选的。
It is always optional to re-state any base interface in a partial class.
他们只是简单定义了一个其他对象可以实现的接口。
They simply define an interface that other objects are responsible for implementing.
现在我们已经准备好提供接口的实现。
We are now ready to provide implementations for the interfaces.
在此用例中,系统接口组件是契约之类内容的实现。
In this use case, the system interface component is the implementation of such as contract.
我们的接口很简单,所以我们的实现也很简单。
Our interface was simple, therefore our implementation is simple as well.
具体的接口依赖于实现语言,在这里无关紧要。
The exact interfaces depend on the implementation language and do not matter here.
您可以想像原始接口的一个简单实现,如清单4所示。
You can imagine a simple implementation to your original interface, as shown in Listing 4.
当然,这意味着需要更多的工作量以实现该接口。
Of course, this would mean extra work to implement the interface.
不需要编写或实现更多的接口。
第二个包中的类文件实现了第一个包中的接口。
The class files from the second package implement the interfaces from the first.
有一个重大的区别:MDB现在可以实现任何接口。
Well, there is one big difference: an MDB can now implement any interface.
在测试代码中,创建模仿对象且实现与合作者相同的接口。
In your test code, create a mock object implementing the same interface as the collaborator.
开发人员只需实现几个简单的接口,就能提供一个仓库。
As long as you can implement a few simple interfaces, you can supply a repository.
假设有个类型D,它的基类B实现了某些接口。
Suppose you have a derived class D whose base class B has implemented some interfaces.
由于这些添加的内容都是在分离的扩展接口中实现的,并不要求程序员断开与客户机的连接。
Since the additions are done in separate extension interfaces you do not break the clients.
接下来看看接口的实现,如清单9所示。
Now you can move on to the implementation, which is shown in Listing 9.
您可以实现任意多的接口。
实现这个接口的过程,和之前的版本一样。
The process for implementing this interface is essentially the same as the original version.
对接口没有实质性影响的服务提供者实现变更。
Change to the service provider implementation which has no material impact to the interface.
清单1:作为通用接口的特殊实现的服务模拟。
Listing 1: Service mock that is a special implementation of a common interface.
模型的最后一部分是实现translation_library接口。
The last part of the model is to implement the translation_library interface.
groovy脚本必须包含至少一个实现接口的类。
The GroovyPdfGenerator.groovy script must contain at least one class that implements your interface.
Class是实际的类,比如实现枚举接口的类。
Class is the actual class, such as a class that implements the enumeration interface.
需要特别指出的很重要的一点就是所有的对象都实现了这个空接口。
It is important to note that every object implements the empty interface.
在客户端,定义一个实现 AsyncCallback接口的类。
On the client side, you define a class that implements the interface AsyncCallback.
您可以通过实现这个接口来处理许可检查的结果。
Interface that you implement to handle result of the license check.
一个接口不能提供任何实现的代码。
An interface cannot provide any code at all, much less default code.
测试结果表明,该接口实现了十路千兆的线速处理的性能要求。
The test result indicates that this interface has reached line rate performance of ten gigabits.
测试结果表明,该接口实现了十路千兆的线速处理的性能要求。
The test result indicates that this interface has reached line rate performance of ten gigabits.
应用推荐