/** Unsafely returns a copy of the given entry. */ E copyForTesting(InternalEntry<K, V, ?> entry, @NullableDecl InternalEntry<K, V, ?> newNext) { return this.map.entryHelper.copy(self(), castForTesting(entry), castForTesting(newNext)); }
/** Unsafely removes the given entry from the given chain in this segment's hash table. */ E removeFromChainForTesting(InternalEntry<K, V, ?> first, InternalEntry<K, V, ?> entry) { return removeFromChain(castForTesting(first), castForTesting(entry)); }
/** Unsafely sets the value of the given entry. */ void setValueForTesting(InternalEntry<K, V, ?> entry, V value) { this.map.entryHelper.setValue(self(), castForTesting(entry), value); }
/** * Unsafely sets the given index of this segment's internal hash table to be the given entry. */ void setTableEntryForTesting(int i, InternalEntry<K, V, ?> entry) { table.set(i, castForTesting(entry)); }
/** Unsafely removes the given entry from this segment's hash table. */ @CanIgnoreReturnValue boolean removeTableEntryForTesting(InternalEntry<K, V, ?> entry) { return removeEntryForTesting(castForTesting(entry)); }
/** * Unsafely returns the value of the given entry if it's still live, or {@code null} otherwise. */ @NullableDecl V getLiveValueForTesting(InternalEntry<K, V, ?> entry) { return getLiveValue(castForTesting(entry)); }
/** Unsafely sets the value of the given entry. */ void setValueForTesting(InternalEntry<K, V, ?> entry, V value) { this.map.entryHelper.setValue(self(), castForTesting(entry), value); }
/** Unsafely returns a fresh entry. */ E newEntryForTesting(K key, int hash, @NullableDecl InternalEntry<K, V, ?> next) { return this.map.entryHelper.newEntry(self(), key, hash, castForTesting(next)); }
/** * Unsafely returns the value of the given entry if it's still live, or {@code null} otherwise. */ @NullableDecl V getLiveValueForTesting(InternalEntry<K, V, ?> entry) { return getLiveValue(castForTesting(entry)); }
/** Unsafely removes the given entry from the given chain in this segment's hash table. */ E removeFromChainForTesting(InternalEntry<K, V, ?> first, InternalEntry<K, V, ?> entry) { return removeFromChain(castForTesting(first), castForTesting(entry)); }
/** Unsafely removes the given entry from this segment's hash table. */ @CanIgnoreReturnValue boolean removeTableEntryForTesting(InternalEntry<K, V, ?> entry) { return removeEntryForTesting(castForTesting(entry)); }
/** * Unsafely sets the given index of this segment's internal hash table to be the given entry. */ void setTableEntryForTesting(int i, InternalEntry<K, V, ?> entry) { table.set(i, castForTesting(entry)); }
/** Unsafely returns a copy of the given entry. */ E copyForTesting(InternalEntry<K, V, ?> entry, @NullableDecl InternalEntry<K, V, ?> newNext) { return this.map.entryHelper.copy(self(), castForTesting(entry), castForTesting(newNext)); }
/** Unsafely returns a copy of the given entry. */ E copyForTesting(InternalEntry<K, V, ?> entry, @Nullable InternalEntry<K, V, ?> newNext) { return this.map.entryHelper.copy(self(), castForTesting(entry), castForTesting(newNext)); }
/** Unsafely sets the value of the given entry. */ void setValueForTesting(InternalEntry<K, V, ?> entry, V value) { this.map.entryHelper.setValue(self(), castForTesting(entry), value); }
/** Unsafely removes the given entry from this segment's hash table. */ @CanIgnoreReturnValue boolean removeTableEntryForTesting(InternalEntry<K, V, ?> entry) { return removeEntryForTesting(castForTesting(entry)); }
/** * Unsafely returns the value of the given entry if it's still live, or {@code null} otherwise. */ @Nullable V getLiveValueForTesting(InternalEntry<K, V, ?> entry) { return getLiveValue(castForTesting(entry)); }
/** * Unsafely sets the given index of this segment's internal hash table to be the given entry. */ void setTableEntryForTesting(int i, InternalEntry<K, V, ?> entry) { table.set(i, castForTesting(entry)); }
/** Unsafely removes the given entry from the given chain in this segment's hash table. */ E removeFromChainForTesting(InternalEntry<K, V, ?> first, InternalEntry<K, V, ?> entry) { return removeFromChain(castForTesting(first), castForTesting(entry)); }
/** Unsafely returns a fresh entry. */ E newEntryForTesting(K key, int hash, @Nullable InternalEntry<K, V, ?> next) { return this.map.entryHelper.newEntry(self(), key, hash, castForTesting(next)); }