Class ObjectIdentityKey


  • public class ObjectIdentityKey
    extends Object
    ObjectIdentityKey is an object wrapper to be used as an object identity based key in a Collection Map or Set.

    Java itself only provides the IdentityHashMap class. When for example a ConcurrentHashMap needs to be used,instead and the key object equals implementation isn't using object identity comparison, then this class can be used to wrap the key objects to enforce this.

    • Constructor Detail

      • ObjectIdentityKey

        public ObjectIdentityKey​(Object object)