Skip to content

Commit 0f9ba23

Browse files
committed
tidy up generics
1 parent d619551 commit 0f9ba23

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

hamcrest-library/src/main/java/org/hamcrest/collection/IsMapContaining.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public void describeTo(Description description) {
5656
* the value matcher that, in combination with the keyMatcher, must be satisfied by at least one entry
5757
*/
5858
public static <K,V> Matcher<Map<? extends K,? extends V>> hasEntry(Matcher<? super K> keyMatcher, Matcher<? super V> valueMatcher) {
59-
return new IsMapContaining<K,V>(keyMatcher, valueMatcher);
59+
return new IsMapContaining<>(keyMatcher, valueMatcher);
6060
}
6161

6262
/**
@@ -72,7 +72,7 @@ public static <K,V> Matcher<Map<? extends K,? extends V>> hasEntry(Matcher<? sup
7272
* the value that, in combination with the key, must be describe at least one entry
7373
*/
7474
public static <K,V> Matcher<Map<? extends K,? extends V>> hasEntry(K key, V value) {
75-
return new IsMapContaining<K,V>(equalTo(key), equalTo(value));
75+
return new IsMapContaining<>(equalTo(key), equalTo(value));
7676
}
7777

7878
/**
@@ -85,7 +85,7 @@ public static <K,V> Matcher<Map<? extends K,? extends V>> hasEntry(K key, V valu
8585
* the matcher that must be satisfied by at least one key
8686
*/
8787
public static <K> Matcher<Map<? extends K, ?>> hasKey(Matcher<? super K> keyMatcher) {
88-
return new IsMapContaining<K,Object>(keyMatcher, anything());
88+
return new IsMapContaining<>(keyMatcher, anything());
8989
}
9090

9191
/**
@@ -98,7 +98,7 @@ public static <K,V> Matcher<Map<? extends K,? extends V>> hasEntry(K key, V valu
9898
* the key that satisfying maps must contain
9999
*/
100100
public static <K> Matcher<Map<? extends K, ?>> hasKey(K key) {
101-
return new IsMapContaining<K,Object>(equalTo(key), anything());
101+
return new IsMapContaining<>(equalTo(key), anything());
102102
}
103103

104104
/**
@@ -111,7 +111,7 @@ public static <K,V> Matcher<Map<? extends K,? extends V>> hasEntry(K key, V valu
111111
* the matcher that must be satisfied by at least one value
112112
*/
113113
public static <V> Matcher<Map<?, ? extends V>> hasValue(Matcher<? super V> valueMatcher) {
114-
return new IsMapContaining<Object,V>(anything(), valueMatcher);
114+
return new IsMapContaining<>(anything(), valueMatcher);
115115
}
116116

117117
/**
@@ -124,6 +124,6 @@ public static <K,V> Matcher<Map<? extends K,? extends V>> hasEntry(K key, V valu
124124
* the value that satisfying maps must contain
125125
*/
126126
public static <V> Matcher<Map<?, ? extends V>> hasValue(V value) {
127-
return new IsMapContaining<Object,V>(anything(), equalTo(value));
127+
return new IsMapContaining<>(anything(), equalTo(value));
128128
}
129129
}

0 commit comments

Comments
 (0)