Package icyllis.modernui.util

# Interface Pools.Pool<T>

Type Parameters:
  `T` - The pooled type.

All Known Implementing Classes:
  `MpmcArrayQueue`, `Pools.SimplePool`, `Pools.SynchronizedPool`

Enclosing class:
  `Pools`

public static interface Pools.Pool<T>
Interface for managing a pool of objects.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `T`
  `acquire()`
  `boolean`
  `release(T instance)`
  Release an instance to the pool.

- ## Method Details

  - ### acquire

    @Nullable T acquire()
    Returns:
      An instance from the pool if such, null otherwise.

  - ### release

    boolean release(@NonNull T instance)
    Release an instance to the pool.
    Parameters:
      `instance` - The instance to release.
    Returns:
      Whether the instance was put in the pool.
    Throws:
      `IllegalStateException` - If the instance is already in the pool.