singleton 英 ['sɪŋg(ə)lt(ə)n]   美 ['sɪŋɡltən]

singleton

singleton  英 ['sɪŋg(ə)lt(ə)n] 美 ['sɪŋɡltən]

n. 一个;独身 

名词复数:singletons 

Since there is only one singleton instance, any instance fields of a singleton will occur only once per class, just like static fields. 由于只有一个单实例,单例对象的域只会在一个类中出现一次,就像静态域一样。
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. 比如说,一个表达式不能引用类或者对象主体内才被计算的实例字段,但是它可以引用一个方法或者一个单例对象。

  • 请先登录
  • n. 一个;独身
  • 1. Since there is only one singleton instance, any instance fields of a singleton will occur only once per class, just like static fields.

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

  • 2. 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.

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

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

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

  • singleton (n.) "single card of a suit in a hand," 1876, originally in whist, from single (adj.); compare simpleton, etc. Extended early 20c. to other instances of singularity.
single·ton / ˈsɪŋɡltən ; NAmE ˈsɪŋɡltən / noun 1 a single item of the kind that you are talking about (所提及的)单项物,单个的人 2 a person who is not married or in a romantic relationship 单身男子(或女子) 3 a person or an animal that is not a twin, etc. (非孪生的)单生儿,单生幼畜 singleton singletons single·ton / ˈsɪŋɡltən ; NAmE ˈsɪŋɡltən /
  • 请先登录