/** * Creates a new entry object for the ReferenceMap. * * @param parent the parent map * @param next the next entry in the hash bucket * @param hashCode the hash code of the key * @param key the key * @param value the value */ public ReferenceEntry(AbstractReferenceMap<K, V> parent, ReferenceEntry<K, V> next, int hashCode, K key, V value) { super(next, hashCode, null, null); this.parent = parent; if (parent.keyType != HARD) { refKey = toReference(parent.keyType, key, hashCode); } else { this.setKey(key); } if (parent.valueType != HARD) { refValue = toReference(parent.valueType, value, hashCode); // the key hashCode is passed in deliberately } else { this.setValue(value); } }
/** * Creates a new entry object for the ReferenceMap. * * @param parent the parent map * @param next the next entry in the hash bucket * @param hashCode the hash code of the key * @param key the key * @param value the value */ public ReferenceEntry(AbstractReferenceMap<K, V> parent, ReferenceEntry<K, V> next, int hashCode, K key, V value) { super(next, hashCode, null, null); this.parent = parent; if (parent.keyType != HARD) { refKey = toReference(parent.keyType, key, hashCode); } else { this.setKey(key); } if (parent.valueType != HARD) { refValue = toReference(parent.valueType, value, hashCode); // the key hashCode is passed in deliberately } else { this.setValue(value); } }
/** * Creates a new entry object for the ReferenceMap. * * @param parent the parent map * @param next the next entry in the hash bucket * @param hashCode the hash code of the key * @param key the key * @param value the value */ public ReferenceEntry(AbstractReferenceMap<K, V> parent, ReferenceEntry<K, V> next, int hashCode, K key, V value) { super(next, hashCode, null, null); this.parent = parent; if (parent.keyType != HARD) { refKey = toReference(parent.keyType, key, hashCode); } else { this.setKey(key); } if (parent.valueType != HARD) { refValue = toReference(parent.valueType, value, hashCode); // the key hashCode is passed in deliberately } else { this.setValue(value); } }