public class UnboundedFifoPool<T> extends Object
| Constructor and Description |
|---|
UnboundedFifoPool()
Create an UnboundedFifoPool with default initial capacity.
|
UnboundedFifoPool(int capacity)
Create an UnboundedFifoPool with the specified initial capacity.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(T element)
Add an element to the pool.
|
void |
clear() |
boolean |
isEmpty()
Determine if the FIFO pool is empty.
|
T |
remove()
Remove an element from the pool.
|
int |
size() |
public UnboundedFifoPool(int capacity)
capacity - Number of elements the pool can initially hold. The capacity will increase as elements are added to the pool.public UnboundedFifoPool()
public final void add(T element)
element - element to add.public final T remove()
public final boolean isEmpty()
public void clear()
public int size()
Copyright © 2018 Campagne Laboratory. All rights reserved.