Class HashCodeAndEqualsSafeSet

java.lang.Object
org.mockito.internal.util.collections.HashCodeAndEqualsSafeSet
All Implemented Interfaces:
Iterable<Object>, Collection<Object>, Set<Object>

public class HashCodeAndEqualsSafeSet extends Object implements Set<Object>
hashCode and equals safe hash based set.

Useful for holding mocks that have un-stubbable hashCode or equals method, meaning that in this scenario the real code is always called and will most probably cause an NullPointerException.

This collection wraps the mock in an augmented type HashCodeAndEqualsMockWrapper that have his own implementation.

See Also: