Skip to content

Commit fe2e808

Browse files
committed
JavaDoc only @return org.hamcrest.text
1 parent 650e5cf commit fe2e808

7 files changed

Lines changed: 21 additions & 0 deletions

File tree

hamcrest/src/main/java/org/hamcrest/text/CharSequenceLength.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ protected Integer featureValueOf(CharSequence actual) {
3333
* </pre>
3434
*
3535
* @param length the expected length of the string
36+
* @return The matcher.
3637
*/
3738
public static Matcher<CharSequence> hasLength(int length) {
3839
return new CharSequenceLength(equalTo(length));
@@ -47,6 +48,7 @@ public static Matcher<CharSequence> hasLength(int length) {
4748
* </pre>
4849
*
4950
* @param lengthMatcher the expected length of the string
51+
* @return The matcher.
5052
*/
5153
@SuppressWarnings("WeakerAccess")
5254
public static Matcher<CharSequence> hasLength(Matcher<? super Integer> lengthMatcher) {

hamcrest/src/main/java/org/hamcrest/text/IsBlankString.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ public void describeTo(Description description) {
3737
* zero or more whitespace characters and nothing else.
3838
* For example:
3939
* <pre>assertThat(" ", is(blankString()))</pre>
40+
*
41+
* @return The matcher.
4042
*/
4143
public static Matcher<String> blankString() {
4244
return BLANK_INSTANCE;
@@ -47,6 +49,8 @@ public static Matcher<String> blankString() {
4749
* contains zero or more whitespace characters and nothing else.
4850
* For example:
4951
* <pre>assertThat(((String)null), is(blankOrNullString()))</pre>
52+
*
53+
* @return The matcher.
5054
*/
5155
public static Matcher<String> blankOrNullString() {
5256
return NULL_OR_BLANK_INSTANCE;

hamcrest/src/main/java/org/hamcrest/text/IsEmptyString.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public void describeTo(Description description) {
3434
* <pre>assertThat("", isEmptyString())</pre>
3535
*
3636
* @deprecated use is(emptyString()) instead
37+
* @return The matcher.
3738
*/
3839
@Deprecated
3940
public static Matcher<String> isEmptyString() {
@@ -44,6 +45,8 @@ public static Matcher<String> isEmptyString() {
4445
* Creates a matcher of {@link String} that matches when the examined string has zero length.
4546
* For example:
4647
* <pre>assertThat("", is(emptyString()))</pre>
48+
*
49+
* @return The matcher.
4750
*/
4851
public static Matcher<String> emptyString() {
4952
return INSTANCE;
@@ -56,6 +59,7 @@ public static Matcher<String> emptyString() {
5659
* <pre>assertThat(((String)null), isEmptyOrNullString())</pre>
5760
*
5861
* @deprecated use is(emptyOrNullString()) instead
62+
* @return The matcher.
5963
*/
6064
@Deprecated
6165
public static Matcher<String> isEmptyOrNullString() {
@@ -67,6 +71,8 @@ public static Matcher<String> isEmptyOrNullString() {
6771
* has zero length.
6872
* For example:
6973
* <pre>assertThat(((String)null), is(emptyOrNullString()))</pre>
74+
*
75+
* @return The matcher.
7076
*/
7177
public static Matcher<String> emptyOrNullString() {
7278
return NULL_OR_EMPTY_INSTANCE;

hamcrest/src/main/java/org/hamcrest/text/IsEqualCompressingWhiteSpace.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public String stripSpaces(String toBeStripped) {
4646
* @deprecated {@link #equalToCompressingWhiteSpace(String)}
4747
* @param expectedString
4848
* the expected value of matched strings
49+
* @return The matcher.
4950
*/
5051
public static Matcher<String> equalToIgnoringWhiteSpace(String expectedString) {
5152
return new IsEqualCompressingWhiteSpace(expectedString);
@@ -64,6 +65,7 @@ public static Matcher<String> equalToIgnoringWhiteSpace(String expectedString) {
6465
*
6566
* @param expectedString
6667
* the expected value of matched strings
68+
* @return The matcher.
6769
*/
6870
public static Matcher<String> equalToCompressingWhiteSpace(String expectedString) {
6971
return new IsEqualCompressingWhiteSpace(expectedString);

hamcrest/src/main/java/org/hamcrest/text/IsEqualIgnoringCase.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public void describeTo(Description description) {
4646
*
4747
* @param expectedString
4848
* the expected value of matched strings
49+
* @return The matcher.
4950
*/
5051
public static Matcher<String> equalToIgnoringCase(String expectedString) {
5152
return new IsEqualIgnoringCase(expectedString);

hamcrest/src/main/java/org/hamcrest/text/MatchesPattern.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ public void describeTo(Description description) {
2626
/**
2727
* Creates a matcher of {@link java.lang.String} that matches when the examined string
2828
* exactly matches the given {@link java.util.regex.Pattern}.
29+
*
30+
* @return The matcher.
2931
*/
3032
public static Matcher<String> matchesPattern(Pattern pattern) {
3133
return new MatchesPattern(pattern);
@@ -34,6 +36,8 @@ public static Matcher<String> matchesPattern(Pattern pattern) {
3436
/**
3537
* Creates a matcher of {@link java.lang.String} that matches when the examined string
3638
* exactly matches the given regular expression, treated as a {@link java.util.regex.Pattern}.
39+
*
40+
* @return The matcher.
3741
*/
3842
public static Matcher<String> matchesPattern(String regex) {
3943
return new MatchesPattern(Pattern.compile(regex));

hamcrest/src/main/java/org/hamcrest/text/StringContainsInOrder.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public void describeTo(Description description) {
4949
*
5050
* @param substrings
5151
* the substrings that must be contained within matching strings
52+
* @return The matcher.
5253
*/
5354
public static Matcher<String> stringContainsInOrder(Iterable<String> substrings) {
5455
return new StringContainsInOrder(substrings);
@@ -63,6 +64,7 @@ public static Matcher<String> stringContainsInOrder(Iterable<String> substrings)
6364
*
6465
* @param substrings
6566
* the substrings that must be contained within matching strings
67+
* @return The matcher.
6668
*/
6769
public static Matcher<String> stringContainsInOrder(String... substrings) {
6870
return new StringContainsInOrder(Arrays.asList(substrings));

0 commit comments

Comments
 (0)