com.google.common.collect.testing
Class MinimalSet<E>
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>
public class MinimalSet<E>
- 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.
This class is GWT compatible.
- Author:
- Regina O'Dell
| Methods inherited from interface java.util.Set |
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
of
public static <E> MinimalSet<E> of(E... contents)
from
public static <E> MinimalSet<E> from(Collection<? extends E> contents)
ofClassAndContents
public static <E> MinimalSet<E> ofClassAndContents(Class<? super E> type,
E[] emptyArrayForContents,
Iterable<? extends E> contents)
equals
public boolean equals(Object object)
- Specified by:
equals in interface Collection<E>- Specified by:
equals in interface Set<E>- Overrides:
equals in class Object
hashCode
public int hashCode()
- Specified by:
hashCode in interface Collection<E>- Specified by:
hashCode in interface Set<E>- Overrides:
hashCode in class Object
Copyright © 2010-2011. All Rights Reserved.