157 |
|
* key |
158 |
|
* @throws ClassCastException if the key is of an inappropriate type for |
159 |
|
* this map |
160 |
< |
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>) |
160 |
> |
* (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>) |
161 |
|
* @throws NullPointerException if the specified key is null and this map |
162 |
|
* does not permit null keys |
163 |
< |
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>) |
163 |
> |
* (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>) |
164 |
|
*/ |
165 |
|
boolean containsKey(Object key); |
166 |
|
|
177 |
|
* specified value |
178 |
|
* @throws ClassCastException if the value is of an inappropriate type for |
179 |
|
* this map |
180 |
< |
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>) |
180 |
> |
* (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>) |
181 |
|
* @throws NullPointerException if the specified value is null and this |
182 |
|
* map does not permit null values |
183 |
< |
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>) |
183 |
> |
* (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>) |
184 |
|
*/ |
185 |
|
boolean containsValue(Object value); |
186 |
|
|
205 |
|
* {@code null} if this map contains no mapping for the key |
206 |
|
* @throws ClassCastException if the key is of an inappropriate type for |
207 |
|
* this map |
208 |
< |
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>) |
208 |
> |
* (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>) |
209 |
|
* @throws NullPointerException if the specified key is null and this map |
210 |
|
* does not permit null keys |
211 |
< |
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>) |
211 |
> |
* (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>) |
212 |
|
*/ |
213 |
|
V get(Object key); |
214 |
|
|
265 |
|
* is not supported by this map |
266 |
|
* @throws ClassCastException if the key is of an inappropriate type for |
267 |
|
* this map |
268 |
< |
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>) |
268 |
> |
* (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>) |
269 |
|
* @throws NullPointerException if the specified key is null and this |
270 |
|
* map does not permit null keys |
271 |
< |
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>) |
271 |
> |
* (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>) |
272 |
|
*/ |
273 |
|
V remove(Object key); |
274 |
|
|
578 |
|
* {@code defaultValue} if this map contains no mapping for the key |
579 |
|
* @throws ClassCastException if the key is of an inappropriate type for |
580 |
|
* this map |
581 |
< |
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>) |
581 |
> |
* (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>) |
582 |
|
* @throws NullPointerException if the specified key is null and this map |
583 |
|
* does not permit null keys |
584 |
< |
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>) |
584 |
> |
* (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>) |
585 |
|
* @since 1.8 |
586 |
|
*/ |
587 |
|
default V getOrDefault(Object key, V defaultValue) { |
660 |
|
* values |
661 |
|
* @throws ClassCastException if a replacement value is of an inappropriate |
662 |
|
* type for this map |
663 |
< |
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>) |
663 |
> |
* (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>) |
664 |
|
* @throws NullPointerException if function or a replacement value is null, |
665 |
|
* and this map does not permit null keys or values |
666 |
< |
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>) |
666 |
> |
* (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>) |
667 |
|
* @throws IllegalArgumentException if some property of a replacement value |
668 |
|
* prevents it from being stored in this map |
669 |
< |
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>) |
669 |
> |
* (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>) |
670 |
|
* @throws ConcurrentModificationException if an entry is found to be |
671 |
|
* removed during iteration |
672 |
|
* @since 1.8 |
727 |
|
* if the implementation supports null values.) |
728 |
|
* @throws UnsupportedOperationException if the {@code put} operation |
729 |
|
* is not supported by this map |
730 |
< |
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>) |
730 |
> |
* (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>) |
731 |
|
* @throws ClassCastException if the key or value is of an inappropriate |
732 |
|
* type for this map |
733 |
< |
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>) |
733 |
> |
* (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>) |
734 |
|
* @throws NullPointerException if the specified key or value is null, |
735 |
|
* and this map does not permit null keys or values |
736 |
< |
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>) |
736 |
> |
* (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>) |
737 |
|
* @throws IllegalArgumentException if some property of the specified key |
738 |
|
* or value prevents it from being stored in this map |
739 |
< |
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>) |
739 |
> |
* (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>) |
740 |
|
* @since 1.8 |
741 |
|
*/ |
742 |
|
default V putIfAbsent(K key, V value) { |
773 |
|
* @return {@code true} if the value was removed |
774 |
|
* @throws UnsupportedOperationException if the {@code remove} operation |
775 |
|
* is not supported by this map |
776 |
< |
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>) |
776 |
> |
* (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>) |
777 |
|
* @throws ClassCastException if the key or value is of an inappropriate |
778 |
|
* type for this map |
779 |
< |
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>) |
779 |
> |
* (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>) |
780 |
|
* @throws NullPointerException if the specified key or value is null, |
781 |
|
* and this map does not permit null keys or values |
782 |
< |
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>) |
782 |
> |
* (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>) |
783 |
|
* @since 1.8 |
784 |
|
*/ |
785 |
|
default boolean remove(Object key, Object value) { |
822 |
|
* @return {@code true} if the value was replaced |
823 |
|
* @throws UnsupportedOperationException if the {@code put} operation |
824 |
|
* is not supported by this map |
825 |
< |
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>) |
825 |
> |
* (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>) |
826 |
|
* @throws ClassCastException if the class of a specified key or value |
827 |
|
* prevents it from being stored in this map |
828 |
|
* @throws NullPointerException if a specified key or newValue is null, |
829 |
|
* and this map does not permit null keys or values |
830 |
|
* @throws NullPointerException if oldValue is null and this map does not |
831 |
|
* permit null values |
832 |
< |
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>) |
832 |
> |
* (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>) |
833 |
|
* @throws IllegalArgumentException if some property of a specified key |
834 |
|
* or value prevents it from being stored in this map |
835 |
|
* @since 1.8 |
872 |
|
* if the implementation supports null values.) |
873 |
|
* @throws UnsupportedOperationException if the {@code put} operation |
874 |
|
* is not supported by this map |
875 |
< |
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>) |
875 |
> |
* (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>) |
876 |
|
* @throws ClassCastException if the class of the specified key or value |
877 |
|
* prevents it from being stored in this map |
878 |
< |
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>) |
878 |
> |
* (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>) |
879 |
|
* @throws NullPointerException if the specified key or value is null, |
880 |
|
* and this map does not permit null keys or values |
881 |
|
* @throws IllegalArgumentException if some property of the specified key |
955 |
|
* is null |
956 |
|
* @throws UnsupportedOperationException if the {@code put} operation |
957 |
|
* is not supported by this map |
958 |
< |
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>) |
958 |
> |
* (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>) |
959 |
|
* @throws ClassCastException if the class of the specified key or value |
960 |
|
* prevents it from being stored in this map |
961 |
< |
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>) |
961 |
> |
* (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>) |
962 |
> |
* @throws IllegalArgumentException if some property of the specified key |
963 |
> |
* or value prevents it from being stored in this map |
964 |
> |
* (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>) |
965 |
|
* @since 1.8 |
966 |
|
*/ |
967 |
|
default V computeIfAbsent(K key, |
1032 |
|
* remappingFunction is null |
1033 |
|
* @throws UnsupportedOperationException if the {@code put} operation |
1034 |
|
* is not supported by this map |
1035 |
< |
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>) |
1035 |
> |
* (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>) |
1036 |
|
* @throws ClassCastException if the class of the specified key or value |
1037 |
|
* prevents it from being stored in this map |
1038 |
< |
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>) |
1038 |
> |
* (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>) |
1039 |
> |
* @throws IllegalArgumentException if some property of the specified key |
1040 |
> |
* or value prevents it from being stored in this map |
1041 |
> |
* (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>) |
1042 |
|
* @since 1.8 |
1043 |
|
*/ |
1044 |
|
default V computeIfPresent(K key, |
1124 |
|
* remappingFunction is null |
1125 |
|
* @throws UnsupportedOperationException if the {@code put} operation |
1126 |
|
* is not supported by this map |
1127 |
< |
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>) |
1127 |
> |
* (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>) |
1128 |
|
* @throws ClassCastException if the class of the specified key or value |
1129 |
|
* prevents it from being stored in this map |
1130 |
< |
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>) |
1130 |
> |
* (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>) |
1131 |
> |
* @throws IllegalArgumentException if some property of the specified key |
1132 |
> |
* or value prevents it from being stored in this map |
1133 |
> |
* (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>) |
1134 |
|
* @since 1.8 |
1135 |
|
*/ |
1136 |
|
default V compute(K key, |
1219 |
|
* value is associated with the key |
1220 |
|
* @throws UnsupportedOperationException if the {@code put} operation |
1221 |
|
* is not supported by this map |
1222 |
< |
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>) |
1222 |
> |
* (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>) |
1223 |
|
* @throws ClassCastException if the class of the specified key or value |
1224 |
|
* prevents it from being stored in this map |
1225 |
< |
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>) |
1225 |
> |
* (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>) |
1226 |
|
* @throws NullPointerException if the specified key is null and this map |
1227 |
|
* does not support null keys or the value or remappingFunction is |
1228 |
|
* null |
1229 |
+ |
* @throws IllegalArgumentException if some property of the specified key |
1230 |
+ |
* or value prevents it from being stored in this map |
1231 |
+ |
* (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>) |
1232 |
|
* @since 1.8 |
1233 |
|
*/ |
1234 |
|
default V merge(K key, V value, |