Class MinimalSet<E extends @Nullable Object>
java.lang.Object
java.util.AbstractCollection<E>
com.google.common.collect.testing.MinimalCollection<E>
com.google.common.collect.testing.MinimalSet<E>
- All Implemented Interfaces:
Iterable<E>, Collection<E>, Set<E>
@GwtCompatible
@NullMarked
public class MinimalSet<E extends @Nullable Object>
extends MinimalCollection<E>
implements Set<E>
A simplistic set which implements the bare minimum so that it can be used in tests without
relying on any specific Set implementations. Slow. Explicitly allows null elements so that they
can be used in the testers.
- Author:
- Regina O'Dell
-
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic <E extends @Nullable Object>
MinimalSet<E> from(Collection<? extends E> contents) inthashCode()static <E extends @Nullable Object>
MinimalSet<E> of(E... contents) static <E extends @Nullable Object>
MinimalSet<E> ofClassAndContents(Class<? super @NonNull E> type, E[] emptyArrayForContents, Iterable<? extends E> contents) Methods inherited from class MinimalCollection
addAll, clear, contains, containsAll, iterator, ofClassAndContents, removeAll, retainAll, size, toArrayMethods inherited from interface Collection
parallelStream, removeIf, stream, toArray
-
Method Details
-
of
-
from
-
ofClassAndContents
public static <E extends @Nullable Object> MinimalSet<E> ofClassAndContents(Class<? super @NonNull E> type, E[] emptyArrayForContents, Iterable<? extends E> contents) -
equals
-
hashCode
-