Class MinimalCollection<E>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- com.google.common.collect.testing.MinimalCollection<E>
-
- All Implemented Interfaces:
java.lang.Iterable<E>
,java.util.Collection<E>
- Direct Known Subclasses:
MinimalSet
@GwtCompatible public class MinimalCollection<E> extends java.util.AbstractCollection<E>
A simplistic collection which implements only the bare minimum allowed by the spec, and throws exceptions whenever it can.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addAll(java.util.Collection<? extends E> elementsToAdd)
void
clear()
boolean
contains(java.lang.Object object)
boolean
containsAll(java.util.Collection<?> collection)
java.util.Iterator<E>
iterator()
static <E> MinimalCollection<E>
of(E... contents)
static <E> MinimalCollection<E>
ofClassAndContents(java.lang.Class<? super E> type, E... contents)
boolean
removeAll(java.util.Collection<?> elementsToRemove)
boolean
retainAll(java.util.Collection<?> elementsToRetain)
int
size()
java.lang.Object[]
toArray()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
of
public static <E> MinimalCollection<E> of(E... contents)
-
ofClassAndContents
public static <E> MinimalCollection<E> ofClassAndContents(java.lang.Class<? super E> type, E... contents)
-
size
public int size()
-
contains
public boolean contains(java.lang.Object object)
-
containsAll
public boolean containsAll(java.util.Collection<?> collection)
-
iterator
public java.util.Iterator<E> iterator()
-
toArray
public java.lang.Object[] toArray()
-
addAll
public boolean addAll(java.util.Collection<? extends E> elementsToAdd)
-
removeAll
public boolean removeAll(java.util.Collection<?> elementsToRemove)
-
retainAll
public boolean retainAll(java.util.Collection<?> elementsToRetain)
-
-