private boolean isInPool(T instance) {
            for (int i = 0; i < mPoolSize; i++) {
                if (mPool[i] == instance) {
                    return true;
                }
            }
            return false;
        }
Creates a new instance.

@param maxPoolSize The max pool size.

@throws IllegalArgumentException If the max pool size is less than zero.
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/util/obs/Pools.java