singleton中文,singleton的意思,singleton翻译及用法

2026-03-22 09:41 浏览次数 28

singleton

英[ˈsɪŋgltən]美[ˈsɪŋɡəltən]

n. (Singleton) (美)辛格尔顿(人名)

n. 单独的人(或物体);单生子女,单生幼畜;单身的人;(纸牌戏,尤指桥牌)单张;单元(素)集

singleton 英语释义

英语释义

  • a set containing a single member
  • a single object (as distinguished from a pair)
  • the playing card that is the only card in a suit held in a bridge hand as initially dealt

singleton 片语

片语

a singleton单身人士

James SingletonJames Singleton is an acoustic bassist, composer, and producer with an intimate and extensive affiliation with the New Orleans music scene. He is a member of the long-lived New Orleans-based jazz group Astral Project with Johnny Vidacovich, Tony Dagradi and Steve Masakowski.

celibacy独身

yin(苏格兰)一个的

Paul Singleton辛格尔顿

Singleton method单例方法

Singleton Pattern单件模式;单例模式

The Singleton辛戈尔顿

Singleton Thomastown街道地址

singleton object单例对象

Singleton class单例类

singleton 例句

英汉例句

  • this is the singleton root management object that starts and stops all other management objects/daemons.

    这是一个单实例根用户管理对象,开始和终止所有其他管理对象/守护进程。

  • to enforce people to use this singleton rather than creating a new object each time the constructor is made private so that only the rollovercomposite class is able to create instances of itself.

    为了迫使人们使用这个单子实例(singleton)而不是每次创建一个新对象,构造函数被声明成私有的(private),这样便只有rollovercomposite类能够创建它自己的实例。

  • since there is only one singleton instance, any instance fields of a singleton will occur only once per class, just like static fields.

    由于只有一个单实例,单例对象的域只会在一个类中出现一次,就像静态域一样。

  • through this functionality, you can use the popular singleton pattern.

    通过使用这种功能,您可以使用流行的单例模式。

  • the singleton is a useful design pattern for allowing only one instance of your class, but common mistakes can inadvertently allow more than one instance to be created.

    单例模式是一种非常有用的设计模式,它允许你的类对外只提供一个实例,但是常犯的错误在于不止一个实例被创建。

  • an example use case for a singleton would be a database connection pool: you don't want your application to have multiple resource-intensive instances of a connection pool class.

    比如数据库连接池就是单例设计模式的一个例子:我们一般不想让应用程序具有连接池类的多个资源密集型实例。

  • for example, an expression could not refer to an instance field that will be computed inside the class or object body, but it could invoke a method on a singleton object.

    比如说,一个表达式不能引用类或者对象主体内才被计算的实例字段,但是它可以引用一个方法或者一个单例对象。

  • the only other method (set in italics) in the class is used to get a reference to the singleton and to create it if it is not yet instantiated.

    该类中仅剩的另一个方法(用 斜体标识)用于获取该单件的一个引用,如果尚未实例化则创建它。

  • instead you can define some as an object (instead of a class) and it becomes a singleton instance of the class.

    相反您可以定义一个对象(而不是类)并且它将成为类的一个单例实例。

  • since it is thread safe by design, you might cache it in a public static final variable, or wrap it in a singleton pattern after creation for later access.

    因为根据设计它是线程安全的,创建它之后可以把它缓存在一个公共静态最终变量中,或者包装在单实例模式中以供以后访问。

  • thread 1 starts where it left off and executes line //2 which results in another singleton object being created.

    线程1在它停止的地方启动,并执行 //2 代码行,这导致创建另一个singleton对象。

  • for example, if your singleton frame is meant as a global user interface for your application and two are created, your application will have two frames on the screen -- quite confusing for the user.

    举例来讲,如果作为应用程序的全局用户界面的单实例框架被创建了两个,应用程序就会在屏幕上显示两个框架——这会使用户感到非常纠结。

  • singleton mode provides a shared instance of the object with a particular name, which will be retrieved on lookup.

    单态模型提供了具有特定名称的对象的共享实例,可以在查询时对其进行检索。

  • static access is especially useful for implementing the singleton design pattern, where only one instance of class exists.

    静态访问特别适合实现单一设计模式,在这种模式中只存在一个类实例。

  • this singleton is the root management object that starts and stops all other management tasks.

    这个单实例对象是根用户管理对象,启动和停止所有其他管理任务。

  • a singleton service locator with a resource cache creates a global cache that cannot properly handle the component-level mappings for an overloaded resource name.

    带有资源缓存的集合服务定位器创建全局缓存,通过这种方式不能为重载的资源名正确处理组件级映射。

  • the code at be allocates the memory from the heap for the singleton object and stores a pointer to that memory in eax.

    be处的代码为singleton对象从堆中分配内存,并将一个指向该块内存的指针存储到eax 中。

  • this setup means that no matter which thread uses this class in the singleton pattern, whenever that public method is called, it should output the same value.

    这个测试类的意思就是不论那个线程在任何时候,在单例下调用这个类公共方法,都将返回相同的值。

  • upon failure, a singleton must be restarted on the same server or migrated to a new server.

    当失败的时候,独立对象必须在同一个服务器上重起或者移植到另一台服务器上。

相关热词