public Reference<K, V> createReference(Entry<K, V> entry, int hash, @Nullable Reference<K, V> next) {
            if (ConcurrentReferenceHashMap.this.referenceType == ReferenceType.WEAK) {
                return new WeakEntryReference<>(entry, hash, next, this.queue);
            }
            return new SoftEntryReference<>(entry, hash, next, this.queue);
        }
Factory method used to create a new {link Reference}.

@param entry the entry contained in the reference
@param hash  the hash
@param next  the next reference in the chain, or {@code null} if none
@return a new {link Reference}
analyzer/src/main/java/nl/basjes/parse/useragent/utils/springframework/util/ConcurrentReferenceHashMap.java