public final class IdentityHashSet extends Object
MemoryMeter to keep track of
the objects already visited to avoid circular dependencies.
This class provides constant-time performance for the add operation,
assuming the system identity hash function (System.identityHashCode(Object))
disperses elements properly among the buckets.
IdentityHashSet uses linear probing to resolve hash collisions. When a hash collision occurs it will look
for the next null bucket available. To minimize the risk of clustering impacting the performance,
IdentityHashSet will ensure that the underlying array is at most 2/3 full by resizing the array when this
limit is reached.
Copyright © 2023. All rights reserved.