|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hamcrest.BaseMatcher<T>
org.hamcrest.collection.IsIn<T>
public class IsIn<T>
| Constructor Summary | |
|---|---|
IsIn(Collection<T> collection)
|
|
IsIn(T[] elements)
|
|
| Method Summary | ||
|---|---|---|
void |
describeTo(Description buffer)
|
|
static
|
in(Collection<T> collection)
Creates a matcher that matches when the examined object is found within the specified collection. |
|
static
|
in(T[] elements)
Creates a matcher that matches when the examined object is found within the specified array. |
|
static
|
isIn(Collection<T> collection)
Deprecated. use is(in(...)) instead |
|
static
|
isIn(T[] elements)
Deprecated. use is(in(...)) instead |
|
static
|
isOneOf(T... elements)
Deprecated. use is(oneOf(...)) instead |
|
boolean |
matches(Object o)
|
|
static
|
oneOf(T... elements)
Creates a matcher that matches when the examined object is equal to one of the specified elements. |
|
| Methods inherited from class org.hamcrest.BaseMatcher |
|---|
_dont_implement_Matcher___instead_extend_BaseMatcher_, describeMismatch, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public IsIn(Collection<T> collection)
public IsIn(T[] elements)
| Method Detail |
|---|
public boolean matches(Object o)
public void describeTo(Description buffer)
@Deprecated public static <T> Matcher<T> isIn(Collection<T> collection)
assertThat("foo", isIn(Arrays.asList("bar", "foo")))
collection - the collection in which matching items must be foundpublic static <T> Matcher<T> in(Collection<T> collection)
assertThat("foo", is(in(Arrays.asList("bar", "foo"))))
collection - the collection in which matching items must be found@Deprecated public static <T> Matcher<T> isIn(T[] elements)
assertThat("foo", isIn(new String[]{"bar", "foo"}))
elements - the array in which matching items must be foundpublic static <T> Matcher<T> in(T[] elements)
assertThat("foo", is(in(new String[]{"bar", "foo"})))
elements - the array in which matching items must be found@Deprecated public static <T> Matcher<T> isOneOf(T... elements)
assertThat("foo", isOneOf("bar", "foo"))
elements - the elements amongst which matching items will be foundpublic static <T> Matcher<T> oneOf(T... elements)
assertThat("foo", is(oneOf("bar", "foo")))
elements - the elements amongst which matching items will be found
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||