We could either implement each state as a Singleton, or create a factory of states which creates and manages the states.
我们既可以执行每个状态作为Singleton,也可以创建一个状态工厂用于生成和管理状态。
It is implemented as a singleton class.
它是一个单实例类。
Remember that object denotes a singleton in Scala.
还记得吗,object表示 Scala中的一个单例。
Strictly speaking, Ms. Chen, 30, is no longer a singleton.
严格说来,30岁的陈 仪丽不再是独身女性,她已经跟男朋友交往两年,甚至到了谈婚论嫁的地步。
Hence, SignalTranslator adopts a singleton design pattern.
因此,SignalTranslator采用了singleton设计模式。
First, XML is a Scala object. That is, it is a singleton object.
首先,XML是一个Scala对象,即它是一个单例(singleton)对象。
A singleton bean is a singleton in the context of the owning container.
Singletonbean是一个在所属容器上下文中的单例对象。
We don't really need more than one instance here, so a singleton is fine.
我们实际上并不需要更多的实例,所以单体模式也不错。
I'll examine the idea of a singleton, memory pooling, and data streaming.
我将分析单元素、内存池和数据流的概念。
The static getInstance method contains the template code for a singleton.
静态getInstance方法包含单例的模板代码。
Graphics3d is a singleton and _graphics3d holds a reference for later use.
graphics3d是一个单元素,_ graphics3d中保存了一个引用,以备将来使用。
One common use is for storing a singleton of a type that is not thread-safe.
一种常见用法是用于存储非线程安全类型的单例。
The Manager object is a singleton and is needed to create all other objects.
Manager是一个单实例对象,需要它来创建所有其他对象。
Next, UnitsConverter is also a singleton as it is defined using the object keyword.
接下来,UnitsConverter也是一个单例模式,因为它是使用object关键词定义的。
The API is straightforward: You call a singleton method and get back a connection object.
API很直观:您调用单个方法,并返回一个连接对象。
We made our database a singleton in order to limit the database class to only one instance.
我们将数据库当作一个单实例对象,以将database类限制为1个实例。
Both UI components and the Application object (which is a singleton) can receive system events.
UI组件和应用对象(这是一个单例)都能收到系统事件。
Another way is for each component type to use its own instance of service locator, not a singleton.
另外一个方法是每个组件类型使用它自身的服务定位器实例,而不是集合。
When a singleton class is garbage-collected and then reloaded, a new singleton instance is created.
当一个单例对象被当着垃圾回收,然后该单例类又被重新加载,一个新的单例对象被创建。
What seems even more perplexing is why there isn't a singleton version of a stateless session bean.
使我感到更为疑惑的是为什么这里不存在无状态会话bean的单独版本。
Because this decision makes all Leaves identical, we'll keep a singleton for Leaf in a static field.
由于这一决定使所有的Leaf相同,我们将用一个静态字段为Leaf保留一个单元素。
This class is a singleton, meaning there's only one map of running server instances for all projects.
这是一个惟一的类,也就意味着所有项目正在运行的服务器实例只有一个惟一的映射。
This is demonstrated using the ExceptionHandler class, which again adopts a singleton design pattern.
使用exceptionhandler类可以展示这一点,该类也采用了singleton设计模式。
Your service will be a singleton by default, just like it would be if you were using Spring directly.
默认情况下,服务是一个单体,就像直接使用Spring一样。
Therefore, use of a singleton instance for JAX-RS resources should be avoided unless carefully planned.
因此,除非仔细计划,否则应该避免使用JAX - RS资源的单例实例。
This has the usually undesirable effect of making the descriptor something like a singleton. For example.
这通常对描述符起到不好的影响,使它类似于一个单例模式(singleton)。
The remaining alternative is to use a service locator, make it a singleton, but remove the reference cache.
剩下的一个选择是使用服务定位器使用集合的方式,但是要去除引用缓存。
This line of code creates a Singleton object and initializes the variable instance to refer to this object.
此行代码创建了一个Singleton对象并初始化变量instance来引用此对象。
BookServiceImpl is a singleton class that USES an in-memory map to maintain the collection of book objects.
BookService Impl是一个singleton类,使用一个内存映射图(in - memory map)来维护图书对象集合。
The Application class is a singleton class that acts as a controller for all of the application's operations.
Application类是一个单身类(singletonclass),用作应用程序的所有操作的控制器。
应用推荐