org.jhotdraw8.icollection.impl.champ.MutableHashCollisionNode Maven / Gradle / Ivy
/*
* @(#)MutableHashCollisionNode.java
* Copyright © 2023 The authors and contributors of JHotDraw. MIT License.
*/
package org.jhotdraw8.icollection.impl.champ;
import org.jhotdraw8.icollection.impl.IdentityObject;
/**
* A {@link HashCollisionNode} that provides storage space for a 'owner' identity.
*
* References:
*
* This class has been derived from 'The Capsule Hash Trie Collections Library'.
*
* - The Capsule Hash Trie Collections Library.
*
Copyright (c) Michael Steindorfer. BSD-2-Clause License
* - github.com
*
*
* @param
*/
class MutableHashCollisionNode extends HashCollisionNode {
private final IdentityObject ownedBy;
MutableHashCollisionNode(IdentityObject ownedBy, int hash, Object[] entries) {
super(hash, entries);
this.ownedBy = ownedBy;
}
@Override
protected IdentityObject getOwner() {
return ownedBy;
}
}