|
1 | 1 | package org.hamcrest;
|
2 | 2 |
|
| 3 | +import org.hamcrest.collection.IsCollectionContaining; |
| 4 | + |
3 | 5 | import java.util.Collection;
|
4 | 6 | import java.util.List;
|
5 | 7 |
|
@@ -1066,89 +1068,6 @@ public static <K, V> org.hamcrest.Matcher<java.util.Map<? extends K,? extends V>
|
1066 | 1068 | return org.hamcrest.collection.IsMapContaining.<K,V>hasEntry(key, value);
|
1067 | 1069 | }
|
1068 | 1070 |
|
1069 |
| - /** |
1070 |
| - * Creates a matcher for {@link java.util.Map}s matching when the examined {@link java.util.Map}'s set of entries |
1071 |
| - * satisfies the specified <code>entriesMatcher</code>. |
1072 |
| - * For example: |
1073 |
| - * <pre>assertThat(myMap, hasEntries(hasSize(2)))</pre> |
1074 |
| - * |
1075 |
| - * @param entriesMatcher |
1076 |
| - * the matcher that must be satisfied by the set of entries |
1077 |
| - */ |
1078 |
| - public static <K, V> org.hamcrest.Matcher<java.util.Map<? extends K,? extends V>> hasEntries(Matcher<? super java.util.Set<? extends java.util.Map.Entry<? extends K, ? extends V>>> entriesMatcher) { |
1079 |
| - return org.hamcrest.collection.IsMapWithEntries.hasEntries(entriesMatcher); |
1080 |
| - } |
1081 |
| - |
1082 |
| - /** |
1083 |
| - * Creates a matcher for {@link java.util.Map}s matching when the examined {@link java.util.Map}'s set of entries |
1084 |
| - * contains, in any order, entries satisfying the specified <code>entriesMatchers</code>. |
1085 |
| - * For example: |
1086 |
| - * <pre>assertThat(myMap, hasEntries(entry("a key"), entry("another key")))</pre> |
1087 |
| - * |
1088 |
| - * @param entriesMatchers |
1089 |
| - * the matchers that must be satisfied by the entries |
1090 |
| - */ |
1091 |
| - @SafeVarargs |
1092 |
| - public static <K, V> Matcher<java.util.Map<? extends K, ? extends V>> hasEntries(Matcher<? super java.util.Map.Entry<? extends K, ? extends V>>... entriesMatchers) { |
1093 |
| - return org.hamcrest.collection.IsMapWithEntries.hasEntries(entriesMatchers); |
1094 |
| - } |
1095 |
| - |
1096 |
| - /** |
1097 |
| - * Creates a matcher for {@link java.util.Map.Entry}s matching when the examined {@link java.util.Map.Entry} has a key which satisfies |
1098 |
| - * the specified <code>keyMatcher</code>, and a value which satisfies the specified <code>valueMatcher</code>. |
1099 |
| - * For example: |
1100 |
| - * <pre>assertThat(myMap.keySet(), hasItem(entry(equalTo("key"), notNullValue())))</pre> |
1101 |
| - * |
1102 |
| - * @param keyMatcher |
1103 |
| - * the matcher that must be satisfied by the key |
1104 |
| - * @param valueMatcher |
1105 |
| - * the matcher that must be satisfied by the value |
1106 |
| - */ |
1107 |
| - public static <K, V> Matcher<? super java.util.Map.Entry<? extends K, ? extends V>> entry(Matcher<? super K> keyMatcher, Matcher<? super V> valueMatcher) { |
1108 |
| - return org.hamcrest.collection.IsMapEntry.entry(keyMatcher, valueMatcher); |
1109 |
| - } |
1110 |
| - |
1111 |
| - /** |
1112 |
| - * Creates a matcher for {@link java.util.Map.Entry}s matching when the examined {@link java.util.Map.Entry} has a key which satisfies |
1113 |
| - * the specified <code>keyMatcher</code>; the value is ignored. |
1114 |
| - * For example: |
1115 |
| - * <pre>assertThat(myMap.keySet(), hasItem(entry(equalTo("key"))))</pre> |
1116 |
| - * |
1117 |
| - * @param keyMatcher |
1118 |
| - * the matcher that must be satisfied by the key |
1119 |
| - */ |
1120 |
| - public static <K> Matcher<? super java.util.Map.Entry<? extends K, ?>> entry(Matcher<? super K> keyMatcher) { |
1121 |
| - return org.hamcrest.collection.IsMapEntry.entry(keyMatcher); |
1122 |
| - } |
1123 |
| - |
1124 |
| - /** |
1125 |
| - * Creates a matcher for {@link java.util.Map.Entry}s matching when the examined {@link java.util.Map.Entry} has the specified |
1126 |
| - * <code>key</code>, and a value which satisfies the specified <code>valueMatcher</code>. |
1127 |
| - * For example: |
1128 |
| - * <pre>assertThat(myMap.keySet(), hasItem(entry("key", notNullValue())))</pre> |
1129 |
| - * |
1130 |
| - * @param key |
1131 |
| - * the required key |
1132 |
| - * @param valueMatcher |
1133 |
| - * the matcher that must be satisfied by the value |
1134 |
| - */ |
1135 |
| - public static <K, V> Matcher<? super java.util.Map.Entry<? extends K, ? extends V>> entry(K key, Matcher<? super V> valueMatcher) { |
1136 |
| - return org.hamcrest.collection.IsMapEntry.entry(key, valueMatcher); |
1137 |
| - } |
1138 |
| - |
1139 |
| - /** |
1140 |
| - * Creates a matcher for {@link java.util.Map.Entry}s matching when the examined {@link java.util.Map.Entry} has the specified |
1141 |
| - * <code>key</code>; the value is ignored. |
1142 |
| - * For example: |
1143 |
| - * <pre>assertThat(myMap.keySet(), hasItem(entry("key")))</pre> |
1144 |
| - * |
1145 |
| - * @param key |
1146 |
| - * the required key |
1147 |
| - */ |
1148 |
| - public static <K> Matcher<? super java.util.Map.Entry<? extends K, ?>> entry(K key) { |
1149 |
| - return org.hamcrest.collection.IsMapEntry.entry(key); |
1150 |
| - } |
1151 |
| - |
1152 | 1071 | /**
|
1153 | 1072 | * Creates a matcher for {@link java.util.Map}s matching when the examined {@link java.util.Map} contains
|
1154 | 1073 | * at least one key that satisfies the specified matcher.
|
|
0 commit comments