/** * 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 int hashCode() { Object val = getValue(); return hash ^ (val == null ? 0 : val.hashCode()); }
public int hashCode() { Object val = getValue(); return hash ^ (val == null ? 0 : val.hashCode()); }
/** * 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 int hashCode() { Object val = getValue(); return hash ^ (val == null ? 0 : val.hashCode()); }
public int hashCode() { Object val = getValue(); return hash ^ (val == null ? 0 : val.hashCode()); }