org.mockito.internal.util.collections.HashCodeAndEqualsSafeSet Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mockito-all Show documentation
Show all versions of mockito-all Show documentation
Mock objects library for java
/*
* Copyright (c) 2007 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.mockito.internal.util.collections;
import org.mockito.internal.util.Checks;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import static java.lang.reflect.Array.*;
/**
* 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 {@link NullPointerException}.
*
*
* This collection wraps the mock in an augmented type {@link HashCodeAndEqualsMockWrapper}
* that have his own implementation.
*
*
* @see HashCodeAndEqualsMockWrapper
*/
public class HashCodeAndEqualsSafeSet implements Set
© 2015 - 2024 Weber Informatics LLC | Privacy Policy