go top

网络释义

  Singleton class

许多操作单个对象的方法是基于操作其单例类(singleton class),并且这样可以使元编程更简单。获得单例类的经典方法是执行如下代码:

基于74个网页-相关网页

短语

懒汉式单例类 Lazy Singleton

饿汉式单例类 Eager Singleton

使用单例类 Use the singleton-class

单实例类 singleton

 更多收起网络短语

双语例句

  • 他们会发现每次他们要创建一个不同的单例类的时候,都不得不写同样得代码。

    Those who use it will find that they often have to write the same code each time they want to create a different Singleton class.

    youdao

  • 当单例类的副本运行于多个虚拟机中时,每个虚拟机都会为其创建一个实例对象。

    When copies of the singleton class run in multiple VMs, an instance is created for each machine.

    youdao

  • 清单10中的gameservice类是一个单例类,代表给定游戏的游戏服务器和当前状态。

    The GameService class, in Listing 10, is a singleton class that represents the game server and the current state of the given game.

    youdao

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

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

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