A protocol, abstractly, is simply a set of behaviors that an object agrees to conform to.
抽象地说,协议只是对象同意遵循的一组行为。
Regardless of the underlying device protocol, the published event messages conform to a common, well defined format that provides plug-and-play capability.
无论基础设备协议如何,所发布的事件消息都符合提供即插即用功能、定义良好的通用格式。
When you implement the methods of a protocol in one of your classes, your class is said to conform to that protocol.
当你的类实现了协议中的某个方法的时候也就是说你的类实现了那个协议。
应用推荐