T - the type of the instance produced by the Factorypublic static class FactoryBuilder.SingletonFactory<T> extends Object implements Factory<T>, Serializable
Factory that always returns a specific instance. ie: the
factory returns a singleton, regardless of the number of times
Factory.create() is called.| Modifier and Type | Field and Description |
|---|---|
static long |
serialVersionUID
The serialVersionUID required for
Serializable. |
| Constructor and Description |
|---|
SingletonFactory(T instance)
Constructor for the
FactoryBuilder.SingletonFactory. |
| Modifier and Type | Method and Description |
|---|---|
T |
create()
Constructs and returns a fully configured instance of T.
|
boolean |
equals(Object other) |
int |
hashCode() |
public static final long serialVersionUID
Serializable.public SingletonFactory(T instance)
FactoryBuilder.SingletonFactory.instance - the instance to returnCopyright © 2019. All rights reserved.