T
- the type parameterpublic abstract class ResourcePool<T> extends Object
Constructor and Description |
---|
ResourcePool(int maxItems)
Instantiates a new Resource pool.
|
Modifier and Type | Method and Description |
---|---|
void |
apply(Consumer<T> f)
With.
|
void |
apply(Consumer<T> f,
Predicate<T> filter)
With.
|
<U> U |
apply(Function<T,U> f)
With.
|
<U> U |
apply(Function<T,U> f,
Predicate<T> filter)
With.
|
abstract T |
create()
Create t.
|
T |
get()
Get t.
|
T |
get(Predicate<T> filter)
Get t.
|
int |
size()
Size int.
|
public ResourcePool(int maxItems)
maxItems
- the max itemspublic abstract T create()
public T get()
public int size()
public <U> U apply(@Nonnull Function<T,U> f)
U
- the type parameterf
- the fpublic <U> U apply(@Nonnull Function<T,U> f, Predicate<T> filter)
U
- the type parameterf
- the ffilter
- the filterCopyright © 2019 SimiaCryptus Software. All rights reserved.