collections: SequencedDemo put through the reversed view now actually breaks the order (zed=60)
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KqJyCidz3ZgRyHABv2GVJh
This commit is contained in:
@@ -27,7 +27,7 @@ public class SequencedDemo {
|
||||
System.out.println("top2 (by pos) : " + top2);
|
||||
|
||||
// Because it is a view, writes show through.
|
||||
asc.reversed().put("zed", 99);
|
||||
asc.reversed().put("zed", 60);
|
||||
System.out.println("after put via view (no longer sorted): " + asc);
|
||||
|
||||
// Re-ordering an existing LinkedHashMap: putLast moves an existing key to the end.
|
||||
|
||||
Reference in New Issue
Block a user