Cell#updateItem(Object) or
creates new ones via its cellFactory if the pool is empty.
| Modifier and Type | Field and Description |
|---|---|
| private final Function | |
| private final Queue |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | acceptCell(C cell)
Adds the cell to the pool of reusable cells if |
| public void | |
| public C | getCell(T item)
Returns a reusable cell that has been updated with the current item if the pool has one, or returns a
newly-created one via its |
| cellFactory | back to summary |
|---|---|
| private final Function<? super T, ? extends C> cellFactory | |
| pool | back to summary |
|---|---|
| private final Queue<C> pool | |
| CellPool | back to summary |
|---|---|
| public CellPool(Function<? super T, ? extends C> cellFactory) | |
| acceptCell | back to summary |
|---|---|
| public void acceptCell(C cell) Adds the cell to the pool of reusable cells if | |
| dispose | back to summary |
|---|---|
| public void dispose() Disposes the cell pool and prevents any memory leaks. | |
| getCell | back to summary |
|---|---|
| public C getCell(T item) Returns a reusable cell that has been updated with the current item if the pool has one, or returns a
newly-created one via its | |