diff --git a/collections/output/04-sequenced.txt b/collections/output/04-sequenced.txt index 147f5f5..a5a2a50 100644 --- a/collections/output/04-sequenced.txt +++ b/collections/output/04-sequenced.txt @@ -3,7 +3,7 @@ reversed() : {erin=95, alice=90, carol=85, bob=70} firstEntry() : bob=70 lastEntry() : erin=95 top2 (by pos) : [erin=95, alice=90] -after put via view (no longer sorted): {bob=70, carol=85, alice=90, erin=95, zed=99} -putLast/putFirst : {carol=85, alice=90, erin=95, zed=99, bob=70} -TreeMap first : alice=90 reversed: {zed=99, erin=95, carol=85, bob=70, alice=90} -pollFirstEntry: carol=85 -> {alice=90, erin=95, zed=99, bob=70} +after put via view (no longer sorted): {bob=70, carol=85, alice=90, erin=95, zed=60} +putLast/putFirst : {carol=85, alice=90, erin=95, zed=60, bob=70} +TreeMap first : alice=90 reversed: {zed=60, erin=95, carol=85, bob=70, alice=90} +pollFirstEntry: carol=85 -> {alice=90, erin=95, zed=60, bob=70} diff --git a/collections/output/08-tests.txt b/collections/output/08-tests.txt index 177fd43..449af0a 100644 --- a/collections/output/08-tests.txt +++ b/collections/output/08-tests.txt @@ -1,4 +1,4 @@ ------------------------------------------------------------------------------- Test set: com.ankurm.collections.SortingTest ------------------------------------------------------------------------------- -Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.229 s -- in com.ankurm.collections.SortingTest +Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.238 s -- in com.ankurm.collections.SortingTest diff --git a/collections/src/main/java/com/ankurm/collections/SequencedDemo.java b/collections/src/main/java/com/ankurm/collections/SequencedDemo.java index 7ea2c31..551bf6e 100644 --- a/collections/src/main/java/com/ankurm/collections/SequencedDemo.java +++ b/collections/src/main/java/com/ankurm/collections/SequencedDemo.java @@ -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.