com.fitbur.mockito.internal.util.collections.HashCodeAndEqualsSafeSet Maven / Gradle / Ivy
/*
* Copyright (c) 2007 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package com.fitbur.mockito.internal.util.collections;
import com.fitbur.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