Skip to content

Commit e4d2d8a

Browse files
committed
javadoc
1 parent d0a8320 commit e4d2d8a

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

class-match/src/main/java/datadog/instrument/classmatch/StandardMatchers.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,51 +65,51 @@ public static <T> Predicate<T> not(Predicate<T> predicate) {
6565
}
6666

6767
/**
68-
* Matches when the target has the given name.
68+
* Matches when the name equals the given string.
6969
*
7070
* @param name the expected name
71-
* @return {@code true} if the target has the name; otherwise {@code false}
71+
* @return matcher of names with the same value
7272
*/
7373
public static Predicate<String> named(String name) {
7474
return internalName(name)::equals;
7575
}
7676

7777
/**
78-
* Matches when the target has one of the given names.
78+
* Matches when the name equals one of the given strings.
7979
*
8080
* @param names the expected names
81-
* @return {@code true} if the target has one of the names; otherwise {@code false}
81+
* @return matcher of names from the given list
8282
*/
8383
public static Predicate<String> namedOneOf(String... names) {
84-
return internalNames(asList(names))::contains;
84+
return namedOneOf(asList(names));
8585
}
8686

8787
/**
88-
* Matches when the target has one of the given names.
88+
* Matches when the name equals one of the given strings.
8989
*
9090
* @param names the expected names
91-
* @return {@code true} if the target has one of the names; otherwise {@code false}
91+
* @return matcher of names from the given list
9292
*/
9393
public static Predicate<String> namedOneOf(Collection<String> names) {
9494
return internalNames(names)::contains;
9595
}
9696

9797
/**
98-
* Matches when the target's name starts with the given prefix.
98+
* Matches when the name starts with the given prefix.
9999
*
100100
* @param prefix the expected prefix
101-
* @return {@code true} if the target's name starts with the prefix; otherwise {@code false}
101+
* @return matcher of names starting with the prefix
102102
*/
103103
public static Predicate<String> nameStartsWith(String prefix) {
104104
String internalPrefix = internalName(prefix);
105105
return s -> s.startsWith(internalPrefix);
106106
}
107107

108108
/**
109-
* Matches when the target's name ends with the given suffix.
109+
* Matches when the name ends with the given suffix.
110110
*
111111
* @param suffix the expected suffix
112-
* @return {@code true} if the target's name ends with the suffix; otherwise {@code false}
112+
* @return matcher of names ending with the suffix
113113
*/
114114
public static Predicate<String> nameEndsWith(String suffix) {
115115
String internalSuffix = internalName(suffix);

0 commit comments

Comments
 (0)