/** * Creates a new entry. */ private Entry newEntry(int hash, Object key, Object value, Entry next) { int refType = (keyType != HARD) ? keyType : valueType; switch (refType) { case WEAK: return new WeakEntry(hash, key, value, refType == keyType, next, queue); case SOFT: return new SoftEntry(hash, key, value, refType == keyType, next, queue); default: return new HardEntry(hash, key, value, next); } }
/** * Creates a new entry. */ private Entry newEntry(int hash, Object key, Object value, Entry next) { int refType = (keyType != HARD) ? keyType : valueType; switch (refType) { case WEAK: return new WeakEntry(hash, key, value, refType == keyType, next, queue); case SOFT: return new SoftEntry(hash, key, value, refType == keyType, next, queue); default: return new HardEntry(hash, key, value, next); } }
/** * Creates a new entry. */ private Entry newEntry(int hash, Object key, Object value, Entry next) { int refType = (keyType != HARD) ? keyType : valueType; switch (refType) { case WEAK: return new WeakEntry(hash, key, value, refType == keyType, next, queue); case SOFT: return new SoftEntry(hash, key, value, refType == keyType, next, queue); default: return new HardEntry(hash, key, value, next); } }
/** * Creates a new entry. */ private Entry newEntry(int hash, Object key, Object value, Entry next) { int refType = (keyType != HARD) ? keyType : valueType; switch (refType) { case WEAK: return new WeakEntry(hash, key, value, refType == keyType, next, queue); case SOFT: return new SoftEntry(hash, key, value, refType == keyType, next, queue); default: return new HardEntry(hash, key, value, next); } }
public Object clone(ReferenceQueue queue) { // It is the callers responsibility to set the next field // correctly. return new WeakEntry(hash, getKey(), getValue(), keyRef, null, queue); }
public Object clone(ReferenceQueue queue) { // It is the callers responsibility to set the next field // correctly. return new WeakEntry(hash, getKey(), getValue(), keyRef, null, queue); }
public Object clone(ReferenceQueue queue) { // It is the callers responsibility to set the next field // correctly. return new WeakEntry(hash, getKey(), getValue(), keyRef, null, queue); }
public Object clone(ReferenceQueue queue) { // It is the callers responsibility to set the next field // correctly. return new WeakEntry(hash, getKey(), getValue(), keyRef, null, queue); }