Package javax.cache.configuration
Class FactoryBuilder.SingletonFactory<T>
- java.lang.Object
-
- javax.cache.configuration.FactoryBuilder.SingletonFactory<T>
-
- Type Parameters:
T- the type of the instance produced by theFactory
- All Implemented Interfaces:
Serializable,Factory<T>
- Enclosing class:
- FactoryBuilder
public static class FactoryBuilder.SingletonFactory<T> extends Object implements Factory<T>, Serializable
AFactorythat always returns a specific instance. ie: the factory returns a singleton, regardless of the number of timesFactory.create()is called.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static longserialVersionUIDThe serialVersionUID required forSerializable.
-
Constructor Summary
Constructors Constructor Description SingletonFactory(T instance)Constructor for theFactoryBuilder.SingletonFactory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tcreate()Constructs and returns a fully configured instance of T.booleanequals(Object other)inthashCode()
-
-
-
Field Detail
-
serialVersionUID
public static final long serialVersionUID
The serialVersionUID required forSerializable.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SingletonFactory
public SingletonFactory(T instance)
Constructor for theFactoryBuilder.SingletonFactory.- Parameters:
instance- the instance to return
-
-