org.redkale.util

## 类 ObjectPool<T>

- java.lang.Object
- - org.redkale.util.ObjectPool<T>

- 类型参数:
    `T` - 对象池元素的数据类型
  所有已实现的接口:
    java.util.function.Supplier<T>

      public final class ObjectPool<T>
      extends java.lang.Object
      implements java.util.function.Supplier<T>

  详情见: http://www.redkale.org

- - ### 构造器概要

    构造器
    构造器和说明
    `ObjectPool(java.util.concurrent.atomic.AtomicLong creatCounter, java.util.concurrent.atomic.AtomicLong cycleCounter, int max, Creator<T> creator, java.util.function.Consumer<T> prepare, java.util.function.Predicate<T> recycler)`
    `ObjectPool(java.lang.Class<T> clazz, java.util.function.Consumer<T> prepare, java.util.function.Predicate<T> recycler)`
    `ObjectPool(Creator<T> creator, java.util.function.Consumer<T> prepare, java.util.function.Predicate<T> recycler)`
    `ObjectPool(int max, java.lang.Class<T> clazz, java.util.function.Consumer<T> prepare, java.util.function.Predicate<T> recycler)`
    `ObjectPool(int max, Creator<T> creator, java.util.function.Consumer<T> prepare, java.util.function.Predicate<T> recycler)`

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `T` | `get()`
    `long` | `getCreatCount()`
    `long` | `getCycleCount()`
    `void` | `offer(T e)`
    `void` | `setCreator(Creator<T> creator)`

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 构造器详细资料

    - #### ObjectPool

          public ObjectPool(java.lang.Class<T> clazz,
                            java.util.function.Consumer<T> prepare,
                            java.util.function.Predicate<T> recycler)

    - #### ObjectPool

          public ObjectPool(int max,
                            java.lang.Class<T> clazz,
                            java.util.function.Consumer<T> prepare,
                            java.util.function.Predicate<T> recycler)

    - #### ObjectPool

          public ObjectPool(Creator<T> creator,
                            java.util.function.Consumer<T> prepare,
                            java.util.function.Predicate<T> recycler)

    - #### ObjectPool

          public ObjectPool(int max,
                            Creator<T> creator,
                            java.util.function.Consumer<T> prepare,
                            java.util.function.Predicate<T> recycler)

    - #### ObjectPool

          public ObjectPool(java.util.concurrent.atomic.AtomicLong creatCounter,
                            java.util.concurrent.atomic.AtomicLong cycleCounter,
                            int max,
                            Creator<T> creator,
                            java.util.function.Consumer<T> prepare,
                            java.util.function.Predicate<T> recycler)

  - ### 方法详细资料

    - #### setCreator

          public void setCreator(Creator<T> creator)

    - #### get

          public T get()

      指定者:
        `get` 在接口中 `java.util.function.Supplier<T>`

    - #### offer

          public void offer(T e)

    - #### getCreatCount

          public long getCreatCount()

    - #### getCycleCount

          public long getCycleCount()