From fce23bf8680eed6272e4807713336f6bddfe5ef4 Mon Sep 17 00:00:00 2001
From: John Patrick <142304+nhojpatrick@users.noreply.github.com>
Date: Sun, 13 Feb 2022 15:50:24 +0000
Subject: [PATCH] JavaDoc only @return org.hamcrest
---
.../main/java/org/hamcrest/CoreMatchers.java | 58 +++++++
.../main/java/org/hamcrest/Description.java | 12 ++
.../src/main/java/org/hamcrest/Matchers.java | 161 ++++++++++++++++++
.../java/org/hamcrest/StringDescription.java | 3 +
.../hamcrest/TypeSafeDiagnosingMatcher.java | 2 +
.../java/org/hamcrest/TypeSafeMatcher.java | 2 +
6 files changed, 238 insertions(+)
diff --git a/hamcrest/src/main/java/org/hamcrest/CoreMatchers.java b/hamcrest/src/main/java/org/hamcrest/CoreMatchers.java
index 6691bab3..4fd8e74e 100644
--- a/hamcrest/src/main/java/org/hamcrest/CoreMatchers.java
+++ b/hamcrest/src/main/java/org/hamcrest/CoreMatchers.java
@@ -9,6 +9,8 @@ public class CoreMatchers {
* Creates a matcher that matches if the examined object matches ALL of the specified matchers.
* For example:
*
assertThat("myValue", allOf(startsWith("my"), containsString("Val")))
+ *
+ * @return The matcher.
*/
public static org.hamcrest.Matcher allOf(java.lang.Iterable> matchers) {
return org.hamcrest.core.AllOf.allOf(matchers);
@@ -18,6 +20,8 @@ public static org.hamcrest.Matcher allOf(java.lang.IterableALL of the specified matchers.
* For example:
* assertThat("myValue", allOf(startsWith("my"), containsString("Val")))
+ *
+ * @return The matcher.
*/
@SafeVarargs
public static org.hamcrest.Matcher allOf(org.hamcrest.Matcher super T>... matchers) {
@@ -29,6 +33,8 @@ public static org.hamcrest.Matcher allOf(org.hamcrest.Matcher super T>.
* Creates a matcher that matches if the examined object matches ANY of the specified matchers.
* For example:
* assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))
+ *
+ * @return The matcher.
*/
public static org.hamcrest.core.AnyOf anyOf(java.lang.Iterable> matchers) {
return org.hamcrest.core.AnyOf.anyOf(matchers);
@@ -38,6 +44,8 @@ public static org.hamcrest.core.AnyOf anyOf(java.lang.IterableANY of the specified matchers.
* For example:
* assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))
+ *
+ * @return The matcher.
*/
@SafeVarargs
public static org.hamcrest.core.AnyOf anyOf(org.hamcrest.Matcher super T>... matchers) {
@@ -48,6 +56,8 @@ public static org.hamcrest.core.AnyOf anyOf(org.hamcrest.Matcher super
* Creates a matcher that matches when both of the specified matchers match the examined object.
* For example:
* assertThat("fab", both(containsString("a")).and(containsString("b")))
+ *
+ * @return The matcher.
*/
public static org.hamcrest.core.CombinableMatcher.CombinableBothMatcher both(org.hamcrest.Matcher super LHS> matcher) {
return org.hamcrest.core.CombinableMatcher.both(matcher);
@@ -57,6 +67,8 @@ public static org.hamcrest.core.CombinableMatcher.CombinableBothMatcherassertThat("fan", either(containsString("a")).or(containsString("b")))
+ *
+ * @return The matcher.
*/
public static org.hamcrest.core.CombinableMatcher.CombinableEitherMatcher either(org.hamcrest.Matcher super LHS> matcher) {
return org.hamcrest.core.CombinableMatcher.either(matcher);
@@ -74,6 +86,8 @@ public static org.hamcrest.core.CombinableMatcher.CombinableEitherMatcher<
* the matcher to wrap
* @param values
* optional values to insert into the tokenised description
+ *
+ * @return The matcher.
*/
public static org.hamcrest.Matcher describedAs(java.lang.String description, org.hamcrest.Matcher matcher, java.lang.Object... values) {
return org.hamcrest.core.DescribedAs.describedAs(description, matcher, values);
@@ -88,6 +102,8 @@ public static org.hamcrest.Matcher describedAs(java.lang.String descripti
*
* @param itemMatcher
* the matcher to apply to every item provided by the examined {@link Iterable}
+ *
+ * @return The matcher.
*/
public static org.hamcrest.Matcher> everyItem(org.hamcrest.Matcher itemMatcher) {
return org.hamcrest.core.Every.everyItem(itemMatcher);
@@ -100,6 +116,8 @@ public static org.hamcrest.Matcher> everyIte
* assertThat(cheese, is(equalTo(smelly)))
* instead of:
* assertThat(cheese, equalTo(smelly))
+ *
+ * @return The matcher.
*/
public static org.hamcrest.Matcher is(org.hamcrest.Matcher matcher) {
return org.hamcrest.core.Is.is(matcher);
@@ -111,6 +129,8 @@ public static org.hamcrest.Matcher is(org.hamcrest.Matcher matcher) {
* assertThat(cheese, is(smelly))
* instead of:
* assertThat(cheese, is(equalTo(smelly)))
+ *
+ * @return The matcher.
*/
public static org.hamcrest.Matcher is(T value) {
return org.hamcrest.core.Is.is(value);
@@ -122,6 +142,8 @@ public static org.hamcrest.Matcher is(T value) {
* assertThat(cheese, isA(Cheddar.class))
* instead of:
* assertThat(cheese, is(instanceOf(Cheddar.class)))
+ *
+ * @return The matcher.
*/
public static org.hamcrest.Matcher isA(java.lang.Class type) {
return org.hamcrest.core.Is.isA(type);
@@ -129,6 +151,8 @@ public static org.hamcrest.Matcher isA(java.lang.Class type) {
/**
* Creates a matcher that always matches, regardless of the examined object.
+ *
+ * @return The matcher.
*/
public static org.hamcrest.Matcher anything() {
return org.hamcrest.core.IsAnything.anything();
@@ -140,6 +164,8 @@ public static org.hamcrest.Matcher anything() {
*
* @param description
* a meaningful {@link String} used when describing itself
+ *
+ * @return The matcher.
*/
public static org.hamcrest.Matcher anything(java.lang.String description) {
return org.hamcrest.core.IsAnything.anything(description);
@@ -155,6 +181,8 @@ public static org.hamcrest.Matcher anything(java.lang.String d
*
* @param itemMatcher
* the matcher to apply to items provided by the examined {@link Iterable}
+ *
+ * @return The matcher.
*/
public static org.hamcrest.Matcher> hasItem(org.hamcrest.Matcher super T> itemMatcher) {
return IsIterableContaining.hasItem(itemMatcher);
@@ -170,6 +198,8 @@ public static org.hamcrest.Matcher> hasItem(or
*
* @param item
* the item to compare against the items provided by the examined {@link Iterable}
+ *
+ * @return The matcher.
*/
public static org.hamcrest.Matcher> hasItem(T item) {
return IsIterableContaining.hasItem(item);
@@ -185,6 +215,8 @@ public static org.hamcrest.Matcher> hasItem(T
*
* @param itemMatchers
* the matchers to apply to items provided by the examined {@link Iterable}
+ *
+ * @return The matcher.
*/
@SafeVarargs
public static org.hamcrest.Matcher> hasItems(org.hamcrest.Matcher super T>... itemMatchers) {
@@ -201,6 +233,8 @@ public static org.hamcrest.Matcher> hasItems(org.hamcr
*
* @param items
* the items to compare against the items provided by the examined {@link Iterable}
+ *
+ * @return The matcher.
*/
@SafeVarargs
public static org.hamcrest.Matcher> hasItems(T... items) {
@@ -227,6 +261,8 @@ public static org.hamcrest.Matcher> hasItems(T... item
* assertThat("foo", equalTo("foo"));
* assertThat(new String[] {"foo", "bar"}, equalTo(new String[] {"foo", "bar"}));
*
+ *
+ * @return The matcher.
*/
public static org.hamcrest.Matcher equalTo(T operand) {
return org.hamcrest.core.IsEqual.equalTo(operand);
@@ -235,6 +271,8 @@ public static org.hamcrest.Matcher equalTo(T operand) {
/**
* Creates an {@link org.hamcrest.core.IsEqual} matcher that does not enforce the values being
* compared to be of the same static type.
+ *
+ * @return The matcher.
*/
public static org.hamcrest.Matcher equalToObject(java.lang.Object operand) {
return org.hamcrest.core.IsEqual.equalToObject(operand);
@@ -250,6 +288,8 @@ public static org.hamcrest.Matcher equalToObject(java.lang.Obj
* with(any(Thing.class))
* For example:
* assertThat(new Canoe(), any(Canoe.class));
+ *
+ * @return The matcher.
*/
public static org.hamcrest.Matcher any(java.lang.Class type) {
return org.hamcrest.core.IsInstanceOf.any(type);
@@ -263,6 +303,8 @@ public static org.hamcrest.Matcher any(java.lang.Class type) {
* The created matcher assumes no relationship between specified type and the examined object.
* For example:
* assertThat(new Canoe(), instanceOf(Paddlable.class));
+ *
+ * @return The matcher.
*/
public static org.hamcrest.Matcher instanceOf(java.lang.Class> type) {
return org.hamcrest.core.IsInstanceOf.instanceOf(type);
@@ -276,6 +318,7 @@ public static org.hamcrest.Matcher instanceOf(java.lang.Class> type) {
*
* @param matcher
* the matcher whose sense should be inverted
+ * @return The matcher.
*/
public static org.hamcrest.Matcher not(org.hamcrest.Matcher matcher) {
return org.hamcrest.core.IsNot.not(matcher);
@@ -290,6 +333,7 @@ public static org.hamcrest.Matcher not(org.hamcrest.Matcher matcher) {
*
* @param value
* the value that any examined object should not equal
+ * @return The matcher.
*/
public static org.hamcrest.Matcher not(T value) {
return org.hamcrest.core.IsNot.not(value);
@@ -301,6 +345,8 @@ public static org.hamcrest.Matcher not(T value) {
* assertThat(cheese, is(notNullValue()))
* instead of:
* assertThat(cheese, is(not(nullValue())))
+ *
+ * @return The matcher.
*/
public static org.hamcrest.Matcher notNullValue() {
return org.hamcrest.core.IsNull.notNullValue();
@@ -316,6 +362,7 @@ public static org.hamcrest.Matcher notNullValue() {
*
* @param type
* dummy parameter used to infer the generic type of the returned matcher
+ * @return The matcher.
*/
public static org.hamcrest.Matcher notNullValue(java.lang.Class type) {
return org.hamcrest.core.IsNull.notNullValue(type);
@@ -325,6 +372,8 @@ public static org.hamcrest.Matcher notNullValue(java.lang.Class type)
* Creates a matcher that matches if examined object is null
.
* For example:
* assertThat(cheese, is(nullValue())
+ *
+ * @return The matcher.
*/
public static org.hamcrest.Matcher nullValue() {
return org.hamcrest.core.IsNull.nullValue();
@@ -338,6 +387,7 @@ public static org.hamcrest.Matcher nullValue() {
*
* @param type
* dummy parameter used to infer the generic type of the returned matcher
+ * @return The matcher.
*/
public static org.hamcrest.Matcher nullValue(java.lang.Class type) {
return org.hamcrest.core.IsNull.nullValue(type);
@@ -349,6 +399,7 @@ public static org.hamcrest.Matcher nullValue(java.lang.Class type) {
*
* @param target
* the target instance against which others should be assessed
+ * @return The matcher.
*/
public static org.hamcrest.Matcher sameInstance(T target) {
return org.hamcrest.core.IsSame.sameInstance(target);
@@ -360,6 +411,7 @@ public static org.hamcrest.Matcher sameInstance(T target) {
*
* @param target
* the target instance against which others should be assessed
+ * @return The matcher.
*/
public static org.hamcrest.Matcher theInstance(T target) {
return org.hamcrest.core.IsSame.theInstance(target);
@@ -373,6 +425,7 @@ public static org.hamcrest.Matcher theInstance(T target) {
*
* @param substring
* the substring that the returned matcher will expect to find within any examined string
+ * @return The matcher.
*/
public static org.hamcrest.Matcher containsString(java.lang.String substring) {
return org.hamcrest.core.StringContains.containsString(substring);
@@ -386,6 +439,7 @@ public static org.hamcrest.Matcher containsString(java.lang.St
*
* @param substring
* the substring that the returned matcher will expect to find within any examined string
+ * @return The matcher.
*/
public static org.hamcrest.Matcher containsStringIgnoringCase(java.lang.String substring) {
return org.hamcrest.core.StringContains.containsStringIgnoringCase(substring);
@@ -401,6 +455,7 @@ public static org.hamcrest.Matcher containsStringIgnoringCase(
*
* @param prefix
* the substring that the returned matcher will expect at the start of any examined string
+ * @return The matcher.
*/
public static org.hamcrest.Matcher startsWith(java.lang.String prefix) {
return org.hamcrest.core.StringStartsWith.startsWith(prefix);
@@ -416,6 +471,7 @@ public static org.hamcrest.Matcher startsWith(java.lang.String
*
* @param prefix
* the substring that the returned matcher will expect at the start of any examined string
+ * @return The matcher.
*/
public static org.hamcrest.Matcher startsWithIgnoringCase(java.lang.String prefix) {
return org.hamcrest.core.StringStartsWith.startsWithIgnoringCase(prefix);
@@ -429,6 +485,7 @@ public static org.hamcrest.Matcher startsWithIgnoringCase(java
*
* @param suffix
* the substring that the returned matcher will expect at the end of any examined string
+ * @return The matcher.
*/
public static org.hamcrest.Matcher endsWith(java.lang.String suffix) {
return org.hamcrest.core.StringEndsWith.endsWith(suffix);
@@ -442,6 +499,7 @@ public static org.hamcrest.Matcher endsWith(java.lang.String s
*
* @param suffix
* the substring that the returned matcher will expect at the end of any examined string
+ * @return The matcher.
*/
public static org.hamcrest.Matcher endsWithIgnoringCase(java.lang.String suffix) {
return org.hamcrest.core.StringEndsWith.endsWithIgnoringCase(suffix);
diff --git a/hamcrest/src/main/java/org/hamcrest/Description.java b/hamcrest/src/main/java/org/hamcrest/Description.java
index 73bfa385..1abfd677 100644
--- a/hamcrest/src/main/java/org/hamcrest/Description.java
+++ b/hamcrest/src/main/java/org/hamcrest/Description.java
@@ -14,27 +14,37 @@ public interface Description {
/**
* Appends some plain text to the description.
+ *
+ * @return the update description when displaying the matcher error.
*/
Description appendText(String text);
/**
* Appends the description of a {@link SelfDescribing} value to this description.
+ *
+ * @return the update description when displaying the matcher error.
*/
Description appendDescriptionOf(SelfDescribing value);
/**
* Appends an arbitrary value to the description.
+ *
+ * @return the update description when displaying the matcher error.
*/
Description appendValue(Object value);
/**
* Appends a list of values to the description.
+ *
+ * @return the update description when displaying the matcher error.
*/
Description appendValueList(String start, String separator, String end,
T... values);
/**
* Appends a list of values to the description.
+ *
+ * @return the update description when displaying the matcher error.
*/
Description appendValueList(String start, String separator, String end,
Iterable values);
@@ -42,6 +52,8 @@ Description appendValueList(String start, String separator, String end,
/**
* Appends a list of {@link org.hamcrest.SelfDescribing} objects
* to the description.
+ *
+ * @return the update description when displaying the matcher error.
*/
Description appendList(String start, String separator, String end,
Iterable extends SelfDescribing> values);
diff --git a/hamcrest/src/main/java/org/hamcrest/Matchers.java b/hamcrest/src/main/java/org/hamcrest/Matchers.java
index d4f543ea..3ea72228 100644
--- a/hamcrest/src/main/java/org/hamcrest/Matchers.java
+++ b/hamcrest/src/main/java/org/hamcrest/Matchers.java
@@ -14,6 +14,8 @@ public class Matchers {
* Creates a matcher that matches if the examined object matches ALL of the specified matchers.
* For example:
* assertThat("myValue", allOf(startsWith("my"), containsString("Val")))
+ *
+ * @return The matcher.
*/
public static org.hamcrest.Matcher allOf(java.lang.Iterable> matchers) {
return org.hamcrest.core.AllOf.allOf(matchers);
@@ -23,6 +25,8 @@ public static org.hamcrest.Matcher allOf(java.lang.IterableALL of the specified matchers.
* For example:
* assertThat("myValue", allOf(startsWith("my"), containsString("Val")))
+ *
+ * @return The matcher.
*/
@SafeVarargs
public static org.hamcrest.Matcher allOf(org.hamcrest.Matcher super T>... matchers) {
@@ -33,6 +37,8 @@ public static org.hamcrest.Matcher allOf(org.hamcrest.Matcher super T>.
* Creates a matcher that matches if the examined object matches ALL of the specified matchers.
* For example:
* assertThat("myValue", allOf(startsWith("my"), containsString("Val")))
+ *
+ * @return The matcher.
*/
public static org.hamcrest.Matcher allOf(org.hamcrest.Matcher super T> first, org.hamcrest.Matcher super T> second) {
return org.hamcrest.core.AllOf.allOf(first, second);
@@ -42,6 +48,8 @@ public static org.hamcrest.Matcher allOf(org.hamcrest.Matcher super T>
* Creates a matcher that matches if the examined object matches ALL of the specified matchers.
* For example:
* assertThat("myValue", allOf(startsWith("my"), containsString("Val")))
+ *
+ * @return The matcher.
*/
public static org.hamcrest.Matcher allOf(org.hamcrest.Matcher super T> first, org.hamcrest.Matcher super T> second, org.hamcrest.Matcher super T> third) {
return org.hamcrest.core.AllOf.allOf(first, second, third);
@@ -51,6 +59,8 @@ public static org.hamcrest.Matcher allOf(org.hamcrest.Matcher super T>
* Creates a matcher that matches if the examined object matches ALL of the specified matchers.
* For example:
* assertThat("myValue", allOf(startsWith("my"), containsString("Val")))
+ *
+ * @return The matcher.
*/
public static org.hamcrest.Matcher allOf(org.hamcrest.Matcher super T> first, org.hamcrest.Matcher super T> second, org.hamcrest.Matcher super T> third, org.hamcrest.Matcher super T> fourth) {
return org.hamcrest.core.AllOf.allOf(first, second, third, fourth);
@@ -60,6 +70,8 @@ public static org.hamcrest.Matcher allOf(org.hamcrest.Matcher super T>
* Creates a matcher that matches if the examined object matches ALL of the specified matchers.
* For example:
* assertThat("myValue", allOf(startsWith("my"), containsString("Val")))
+ *
+ * @return The matcher.
*/
public static org.hamcrest.Matcher allOf(org.hamcrest.Matcher super T> first, org.hamcrest.Matcher super T> second, org.hamcrest.Matcher super T> third, org.hamcrest.Matcher super T> fourth, org.hamcrest.Matcher super T> fifth) {
return org.hamcrest.core.AllOf.allOf(first, second, third, fourth, fifth);
@@ -69,6 +81,8 @@ public static org.hamcrest.Matcher allOf(org.hamcrest.Matcher super T>
* Creates a matcher that matches if the examined object matches ALL of the specified matchers.
* For example:
* assertThat("myValue", allOf(startsWith("my"), containsString("Val")))
+ *
+ * @return The matcher.
*/
public static org.hamcrest.Matcher allOf(org.hamcrest.Matcher super T> first, org.hamcrest.Matcher super T> second, org.hamcrest.Matcher super T> third, org.hamcrest.Matcher super T> fourth, org.hamcrest.Matcher super T> fifth, org.hamcrest.Matcher super T> sixth) {
return org.hamcrest.core.AllOf.allOf(first, second, third, fourth, fifth, sixth);
@@ -78,6 +92,8 @@ public static org.hamcrest.Matcher allOf(org.hamcrest.Matcher super T>
* Creates a matcher that matches if the examined object matches ANY of the specified matchers.
* For example:
* assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))
+ *
+ * @return The matcher.
*/
public static org.hamcrest.core.AnyOf anyOf(java.lang.Iterable> matchers) {
return org.hamcrest.core.AnyOf.anyOf(matchers);
@@ -87,6 +103,8 @@ public static org.hamcrest.core.AnyOf anyOf(java.lang.IterableANY of the specified matchers.
* For example:
* assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))
+ *
+ * @return The matcher.
*/
@SafeVarargs
public static org.hamcrest.core.AnyOf anyOf(org.hamcrest.Matcher super T>... matchers) {
@@ -97,6 +115,8 @@ public static org.hamcrest.core.AnyOf anyOf(org.hamcrest.Matcher super
* Creates a matcher that matches if the examined object matches ANY of the specified matchers.
* For example:
* assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))
+ *
+ * @return The matcher.
*/
public static org.hamcrest.core.AnyOf anyOf(org.hamcrest.Matcher super T> first, org.hamcrest.Matcher super T> second) {
return org.hamcrest.core.AnyOf.anyOf(first, second);
@@ -106,6 +126,8 @@ public static org.hamcrest.core.AnyOf anyOf(org.hamcrest.Matcher super
* Creates a matcher that matches if the examined object matches ANY of the specified matchers.
* For example:
* assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))
+ *
+ * @return The matcher.
*/
public static org.hamcrest.core.AnyOf anyOf(org.hamcrest.Matcher super T> first, org.hamcrest.Matcher super T> second, org.hamcrest.Matcher super T> third) {
return org.hamcrest.core.AnyOf.anyOf(first, second, third);
@@ -115,6 +137,8 @@ public static org.hamcrest.core.AnyOf anyOf(org.hamcrest.Matcher super
* Creates a matcher that matches if the examined object matches ANY of the specified matchers.
* For example:
* assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))
+ *
+ * @return The matcher.
*/
public static org.hamcrest.core.AnyOf anyOf(org.hamcrest.Matcher super T> first, org.hamcrest.Matcher super T> second, org.hamcrest.Matcher super T> third, org.hamcrest.Matcher super T> fourth) {
return org.hamcrest.core.AnyOf.anyOf(first, second, third, fourth);
@@ -124,6 +148,8 @@ public static org.hamcrest.core.AnyOf anyOf(org.hamcrest.Matcher super
* Creates a matcher that matches if the examined object matches ANY of the specified matchers.
* For example:
* assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))
+ *
+ * @return The matcher.
*/
public static org.hamcrest.core.AnyOf anyOf(org.hamcrest.Matcher super T> first, org.hamcrest.Matcher super T> second, org.hamcrest.Matcher super T> third, org.hamcrest.Matcher super T> fourth, org.hamcrest.Matcher super T> fifth) {
return org.hamcrest.core.AnyOf.anyOf(first, second, third, fourth, fifth);
@@ -133,6 +159,8 @@ public static org.hamcrest.core.AnyOf anyOf(org.hamcrest.Matcher super
* Creates a matcher that matches if the examined object matches ANY of the specified matchers.
* For example:
* assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))
+ *
+ * @return The matcher.
*/
public static org.hamcrest.core.AnyOf anyOf(org.hamcrest.Matcher super T> first, org.hamcrest.Matcher super T> second, org.hamcrest.Matcher super T> third, org.hamcrest.Matcher super T> fourth, org.hamcrest.Matcher super T> fifth, org.hamcrest.Matcher super T> sixth) {
return org.hamcrest.core.AnyOf.anyOf(first, second, third, fourth, fifth, sixth);
@@ -142,6 +170,8 @@ public static org.hamcrest.core.AnyOf anyOf(org.hamcrest.Matcher super
* Creates a matcher that matches when both of the specified matchers match the examined object.
* For example:
* assertThat("fab", both(containsString("a")).and(containsString("b")))
+ *
+ * @return The matcher.
*/
public static org.hamcrest.core.CombinableMatcher.CombinableBothMatcher both(org.hamcrest.Matcher super LHS> matcher) {
return org.hamcrest.core.CombinableMatcher.both(matcher);
@@ -151,6 +181,8 @@ public static org.hamcrest.core.CombinableMatcher.CombinableBothMatcherassertThat("fan", either(containsString("a")).or(containsString("b")))
+ *
+ * @return The matcher.
*/
public static org.hamcrest.core.CombinableMatcher.CombinableEitherMatcher either(org.hamcrest.Matcher super LHS> matcher) {
return org.hamcrest.core.CombinableMatcher.either(matcher);
@@ -168,6 +200,7 @@ public static org.hamcrest.core.CombinableMatcher.CombinableEitherMatcher<
* the matcher to wrap
* @param values
* optional values to insert into the tokenized description
+ * @return The matcher.
*/
public static org.hamcrest.Matcher describedAs(java.lang.String description, org.hamcrest.Matcher matcher, java.lang.Object... values) {
return org.hamcrest.core.DescribedAs.describedAs(description, matcher, values);
@@ -182,6 +215,7 @@ public static org.hamcrest.Matcher describedAs(java.lang.String descripti
*
* @param itemMatcher
* the matcher to apply to every item provided by the examined {@link Iterable}
+ * @return The matcher.
*/
public static org.hamcrest.Matcher> everyItem(org.hamcrest.Matcher itemMatcher) {
return org.hamcrest.core.Every.everyItem(itemMatcher);
@@ -194,6 +228,8 @@ public static org.hamcrest.Matcher> everyIte
* assertThat(cheese, is(equalTo(smelly)))
* instead of:
* assertThat(cheese, equalTo(smelly))
+ *
+ * @return The matcher.
*/
public static org.hamcrest.Matcher is(org.hamcrest.Matcher matcher) {
return org.hamcrest.core.Is.is(matcher);
@@ -205,6 +241,8 @@ public static org.hamcrest.Matcher is(org.hamcrest.Matcher matcher) {
* assertThat(cheese, is(smelly))
* instead of:
* assertThat(cheese, is(equalTo(smelly)))
+ *
+ * @return The matcher.
*/
public static org.hamcrest.Matcher is(T value) {
return org.hamcrest.core.Is.is(value);
@@ -216,6 +254,8 @@ public static org.hamcrest.Matcher is(T value) {
* assertThat(cheese, isA(Cheddar.class))
* instead of:
* assertThat(cheese, is(instanceOf(Cheddar.class)))
+ *
+ * @return The matcher.
*/
public static org.hamcrest.Matcher isA(java.lang.Class> type) {
return org.hamcrest.core.Is.isA(type);
@@ -223,6 +263,7 @@ public static org.hamcrest.Matcher isA(java.lang.Class> type) {
/**
* Creates a matcher that always matches, regardless of the examined object.
+ * @return The matcher.
*/
public static org.hamcrest.Matcher anything() {
return org.hamcrest.core.IsAnything.anything();
@@ -234,6 +275,7 @@ public static org.hamcrest.Matcher anything() {
*
* @param description
* a meaningful {@link String} used when describing itself
+ * @return The matcher.
*/
public static org.hamcrest.Matcher anything(java.lang.String description) {
return org.hamcrest.core.IsAnything.anything(description);
@@ -249,6 +291,7 @@ public static org.hamcrest.Matcher anything(java.lang.String d
*
* @param itemMatcher
* the matcher to apply to items provided by the examined {@link Iterable}
+ * @return The matcher.
*/
public static org.hamcrest.Matcher> hasItem(org.hamcrest.Matcher super T> itemMatcher) {
return IsIterableContaining.hasItem(itemMatcher);
@@ -264,6 +307,7 @@ public static org.hamcrest.Matcher> hasItem(or
*
* @param item
* the item to compare against the items provided by the examined {@link Iterable}
+ * @return The matcher.
*/
public static org.hamcrest.Matcher> hasItem(T item) {
return IsIterableContaining.hasItem(item);
@@ -279,6 +323,7 @@ public static org.hamcrest.Matcher> hasItem(T
*
* @param itemMatchers
* the matchers to apply to items provided by the examined {@link Iterable}
+ * @return The matcher.
*/
@SafeVarargs
public static org.hamcrest.Matcher> hasItems(org.hamcrest.Matcher super T>... itemMatchers) {
@@ -295,6 +340,7 @@ public static org.hamcrest.Matcher> hasItems(org.hamcr
*
* @param items
* the items to compare against the items provided by the examined {@link Iterable}
+ * @return The matcher.
*/
@SafeVarargs
public static org.hamcrest.Matcher> hasItems(T... items) {
@@ -321,6 +367,8 @@ public static org.hamcrest.Matcher> hasItems(T... item
* assertThat("foo", equalTo("foo"));
* assertThat(new String[] {"foo", "bar"}, equalTo(new String[] {"foo", "bar"}));
*
+ *
+ * @return The matcher.
*/
public static org.hamcrest.Matcher equalTo(T operand) {
return org.hamcrest.core.IsEqual.equalTo(operand);
@@ -329,6 +377,8 @@ public static org.hamcrest.Matcher equalTo(T operand) {
/**
* Creates an {@link org.hamcrest.core.IsEqual} matcher that does not enforce the values being
* compared to be of the same static type.
+ *
+ * @return The matcher.
*/
public static org.hamcrest.Matcher