mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8159527: Collections mutator methods should all be marked as optional operations
Reviewed-by: naoto, bpb
This commit is contained in:
parent
873d117932
commit
b2add96c35
5 changed files with 62 additions and 53 deletions
|
@ -237,19 +237,27 @@ public interface NavigableMap<K,V> extends SortedMap<K,V> {
|
|||
|
||||
/**
|
||||
* Removes and returns a key-value mapping associated with
|
||||
* the least key in this map, or {@code null} if the map is empty.
|
||||
* the least key in this map, or {@code null} if the map is empty
|
||||
* (optional operation).
|
||||
*
|
||||
* @return the removed first entry of this map,
|
||||
* or {@code null} if this map is empty
|
||||
*
|
||||
* @throws UnsupportedOperationException if the {@code pollFirstEntry}
|
||||
* operation is not supported by this map
|
||||
*/
|
||||
Map.Entry<K,V> pollFirstEntry();
|
||||
|
||||
/**
|
||||
* Removes and returns a key-value mapping associated with
|
||||
* the greatest key in this map, or {@code null} if the map is empty.
|
||||
* the greatest key in this map, or {@code null} if the map is empty
|
||||
* (optional operation).
|
||||
*
|
||||
* @return the removed last entry of this map,
|
||||
* or {@code null} if this map is empty
|
||||
*
|
||||
* @throws UnsupportedOperationException if the {@code pollLastEntry}
|
||||
* operation is not supported by this map
|
||||
*/
|
||||
Map.Entry<K,V> pollLastEntry();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue