public abstract class Factories
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
protected |
Factories() |
| Modifier and Type | Method and Description |
|---|---|
static <T> BatchFactorySupplier<T> |
create(java.lang.Class<T> type)
Create a
BatchFactorySupplier that supplies instances of the given type, which
are created by invoked their no-arg constructor. |
static <T> BatchFactorySupplier<T> |
create(int size,
java.lang.Class<T> type)
Create a
BatchFactorySupplier that supplies instances of the given type, which
are created by invoked their no-arg constructor. |
public static <T> BatchFactorySupplier<T> create(java.lang.Class<T> type)
BatchFactorySupplier that supplies instances of the given type, which
are created by invoked their no-arg constructor. An error will occur at creation if the type to be pooled has no
zero-arg constructor (it can be private or protected; it doesn't have to be public, but it must exist).T - the type of the pooled objectstype - the type to be pooledBatchFactorySupplier to supply instances of type.public static <T> BatchFactorySupplier<T> create(int size, java.lang.Class<T> type)
BatchFactorySupplier that supplies instances of the given type, which
are created by invoked their no-arg constructor. An error will occur at creation if the type to be pooled has no
zero-arg constructor (it can be private or protected; it doesn't have to be public, but it must exist).T - the type of the pooled objectssize - size of the pooltype - the type to be pooledBatchFactorySupplier to supply instances of type.