T - the type of the instance produced by the FactorySerializable, Factory<T>public 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 | Description |
|---|---|---|
static long |
serialVersionUID |
The serialVersionUID required for
Serializable. |
| Constructor | Description |
|---|---|
SingletonFactory(T instance) |
Constructor for the
FactoryBuilder.SingletonFactory. |
| Modifier and Type | Method | 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 © 2017. All rights reserved.