go top

singleton method

  • 单例方法

网络释义

  单例方法

后天是指我们为单个对象创建的方法,它们只适用于单个对象,Ruby把这种方法叫做单例方法singleton method)。

基于32个网页-相关网页

  特殊方法

...va,我们必须定义一个新类,但在Ruby中,我们可以定义只从属于某个特定对象的方法,这种方法我们成为特殊方法(Singleton Method)。

基于16个网页-相关网页

双语例句

  • The API is straightforward: You call a singleton method and get back a connection object.

    API直观:调用单个方法返回一个连接对象。

    youdao

  • The DefaultDAO class stores an instance of itself (as a Singleton) in the static variable instance, allowing access to that instance through the getInstance() method.

    DefaultDAO静态变量 instance 中存储了它自己一个实例(存储 Singleton),并允许通过 getInstance() 方法访问实例。

    youdao

  • The static getInstance method contains the template code for a singleton.

    静态 getInstance 方法包含单例的模板代码

    youdao

更多双语例句
$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定