org.cloudburstmc.nbt.FloatInternPool Maven / Gradle / Ivy
package org.cloudburstmc.nbt;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.lang.ref.ReferenceQueue;
import java.lang.ref.WeakReference;
import java.util.Map;
import java.util.concurrent.ConcurrentSkipListMap;
import java.util.concurrent.ThreadLocalRandom;
import java.util.stream.IntStream;
/**
* A pool for interning {@link Float} values, with support for very high concurrency.
*
* @author DaPorkchop_, adapted by Camotoy
*/
public final class FloatInternPool {
private static final Map