@Override <K, V> ReferenceEntry<K, V> newEntry( Internals<K, V, ReferenceEntry<K, V>> internals, K key, int hash, ReferenceEntry<K, V> next) { return (next == null) ? new WeakEntry<K, V>(internals, key, hash) : new LinkedWeakEntry<K, V>(internals, key, hash, next); }
@Override <K, V> ReferenceEntry<K, V> newEntry( Internals<K, V, ReferenceEntry<K, V>> internals, K key, int hash, ReferenceEntry<K, V> next) { return (next == null) ? new SoftEntry<K, V>(internals, key, hash) : new LinkedSoftEntry<K, V>(internals, key, hash, next); }
@Override <K, V> ReferenceEntry<K, V> newEntry( Internals<K, V, ReferenceEntry<K, V>> internals, K key, int hash, ReferenceEntry<K, V> next) { return (next == null) ? new StrongEntry<K, V>(internals, key, hash) : new LinkedStrongEntry<K, V>( internals, key, hash, next); }
/** * Creates a new entry based on the current key strength. */ abstract <K, V> ReferenceEntry<K, V> newEntry( Internals<K, V, ReferenceEntry<K, V>> internals, K key, int hash, ReferenceEntry<K, V> next);
public void setInternals( Internals<K, V, ReferenceEntry<K, V>> internals) { this.internals = internals; }
StrongEntry(Internals<K, V, ReferenceEntry<K, V>> internals, K key, int hash) { this.internals = internals; this.key = key; this.hash = hash; }
LinkedStrongEntry(Internals<K, V, ReferenceEntry<K, V>> internals, K key, int hash, ReferenceEntry<K, V> next) { super(internals, key, hash); this.next = next; }
SoftEntry(Internals<K, V, ReferenceEntry<K, V>> internals, K key, int hash) { super(key, QueueHolder.queue); this.internals = internals; this.hash = hash; }
LinkedSoftEntry(Internals<K, V, ReferenceEntry<K, V>> internals, K key, int hash, ReferenceEntry<K, V> next) { super(internals, key, hash); this.next = next; }
WeakEntry(Internals<K, V, ReferenceEntry<K, V>> internals, K key, int hash) { super(key, QueueHolder.queue); this.internals = internals; this.hash = hash; }
LinkedWeakEntry(Internals<K, V, ReferenceEntry<K, V>> internals, K key, int hash, ReferenceEntry<K, V> next) { super(internals, key, hash); this.next = next; }
@Override <K, V> ReferenceEntry<K, V> newEntry(Internals<K, V, ReferenceEntry<K, V>> internals, K key, int hash, ReferenceEntry<K, V> next) { return (next == null) ? new WeakEntry<K, V>(internals, key, hash) : new LinkedWeakEntry<K, V>(internals, key, hash, next); }
@Override <K, V> ReferenceEntry<K, V> newEntry(Internals<K, V, ReferenceEntry<K, V>> internals, K key, int hash, ReferenceEntry<K, V> next) { return (next == null) ? new SoftEntry<K, V>(internals, key, hash) : new LinkedSoftEntry<K, V>(internals, key, hash, next); }
@Override <K, V> ReferenceEntry<K, V> newEntry(Internals<K, V, ReferenceEntry<K, V>> internals, K key, int hash, ReferenceEntry<K, V> next) { return (next == null) ? new StrongEntry<K, V>(internals, key, hash) : new LinkedStrongEntry<K, V>(internals, key, hash, next); }
public void setInternals(Internals<K, V, ReferenceEntry<K, V>> internals) { this.internals = internals; }