Package com.google.common.truth
Class CollectionSubject.Has<T,C extends Collection<T>>
- java.lang.Object
-
- com.google.common.truth.CollectionSubject.Has<T,C>
-
- Enclosing class:
- CollectionSubject<S extends CollectionSubject<S,T,C>,T,C extends Collection<T>>
public class CollectionSubject.Has<T,C extends Collection<T>> extends Object
-
-
Constructor Summary
Constructors Constructor Description Has()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Ordered
allFrom(Iterable<T> required)
Deprecated.UseIterableSubject#containsAllIn(Iterable>)
instead.Ordered
allOf(T first)
Deprecated.UseIterableSubject.contains(Object)
instead.Ordered
allOf(T first, T second, T... rest)
Deprecated.void
anyFrom(Iterable<T> col)
Deprecated.UseIterableSubject#containsAnyIn(Iterable>)
instead.void
anyOf(T first)
Deprecated.UseIterableSubject.contains(Object)
instead.void
anyOf(T first, T second, T... rest)
Deprecated.Ordered
exactly(T first)
Attests that a Collection contains at all of the provided objects and only these objects or fails.Ordered
exactly(T first, T second, T... rest)
Attests that a Collection contains at all of the provided objects and only these objects or fails.Ordered
exactlyAs(Iterable<T> required)
Attests that a Collection contains at all of the objects contained in the provided collection and only these objects or fails.void
item(T item)
Deprecated.UseIterableSubject.contains(Object)
instead.void
noneFrom(Iterable<T> excluded)
Deprecated.UseIterableSubject#containsNoneIn(Iterable>)
instead.void
noneOf(T first)
Deprecated.UseIterableSubject.doesNotContain(Object)
instead.void
noneOf(T first, T second, T... rest)
Deprecated.
-
-
-
Method Detail
-
item
@Deprecated public void item(T item)
Deprecated.UseIterableSubject.contains(Object)
instead.Attests that a Collection contains at least the item
-
anyOf
@Deprecated public void anyOf(T first)
Deprecated.UseIterableSubject.contains(Object)
instead.Attests that a Collection contains the provided object or fails.
-
anyOf
@Deprecated public void anyOf(T first, T second, T... rest)
Deprecated.Attests that a Collection contains at least one of the provided objects or fails.
-
anyFrom
@Deprecated public void anyFrom(Iterable<T> col)
Deprecated.UseIterableSubject#containsAnyIn(Iterable>)
instead.Attests that a Collection contains at least one of the objects contained in the provided collection or fails.
-
allOf
@Deprecated public Ordered allOf(T first)
Deprecated.UseIterableSubject.contains(Object)
instead.Attests that a Collection contains at least all of the provided objects or fails, coping with duplicates in both the Collection and the parameters.
-
allOf
@Deprecated public Ordered allOf(T first, T second, T... rest)
Deprecated.Attests that a Collection contains at least all of the provided objects or fails, coping with duplicates in both the Collection and the parameters.
-
allFrom
@Deprecated public Ordered allFrom(Iterable<T> required)
Deprecated.UseIterableSubject#containsAllIn(Iterable>)
instead.Attests that a Collection contains at least all of the objects contained in the provided collection or fails, coping with duplicates in both the Collection and the parameters.
-
exactly
public Ordered exactly(T first)
Attests that a Collection contains at all of the provided objects and only these objects or fails. This copes with duplicates in both the Collection and the parameters. It makes no attestation about order unlessinOrder()
is explicitly called.
-
exactly
public Ordered exactly(T first, T second, T... rest)
Attests that a Collection contains at all of the provided objects and only these objects or fails. This copes with duplicates in both the Collection and the parameters. It makes no attestation about order unlessinOrder()
is explicitly called.
-
exactlyAs
public Ordered exactlyAs(Iterable<T> required)
Attests that a Collection contains at all of the objects contained in the provided collection and only these objects or fails. This copes with duplicates in both the Collection and the parameters. It makes no attestation about order unlessinOrder()
is explicitly called.
-
noneOf
@Deprecated public void noneOf(T first)
Deprecated.UseIterableSubject.doesNotContain(Object)
instead.Attests that a Collection contains none of the provided objects or fails, coping with duplicates in both the Collection and the parameters.
-
noneOf
@Deprecated public void noneOf(T first, T second, T... rest)
Deprecated.Attests that a Collection contains none of the provided objects or fails, coping with duplicates in both the Collection and the parameters.
-
noneFrom
@Deprecated public void noneFrom(Iterable<T> excluded)
Deprecated.UseIterableSubject#containsNoneIn(Iterable>)
instead.Attests that a Collection contains at none of the objects contained in the provided collection or fails, coping with duplicates in both the Collection and the parameters.
-
-