Example usage for org.apache.commons.collections4.map ReferenceIdentityMap ReferenceIdentityMap

List of usage examples for org.apache.commons.collections4.map ReferenceIdentityMap ReferenceIdentityMap

Introduction

In this page you can find the example usage for org.apache.commons.collections4.map ReferenceIdentityMap ReferenceIdentityMap.

Prototype

public ReferenceIdentityMap(final ReferenceStrength keyType, final ReferenceStrength valueType) 

Source Link

Document

Constructs a new ReferenceIdentityMap that will use the specified types of references.

Usage

From source file:com.tussle.hitbox.HitboxLockComponent.java

public HitboxLockComponent() {
    //There ought to be a more pleasant loader method to do this
    lockMap = new AbstractMultiValuedMap<ScriptIterator, HitboxLock>(new ReferenceIdentityMap<>(
            AbstractReferenceMap.ReferenceStrength.SOFT, AbstractReferenceMap.ReferenceStrength.WEAK)) {
        protected HashSet<HitboxLock> createCollection() {
            return new HashSet<>();
        }//  ww w  .  j ava 2 s .  co m
    };

}