Commit 30fa8d5 Stuart Marks
committed Sep 9, 2020
1 parent 26c7218 commit 30fa8d5 Copy full SHA for 30fa8d5
File tree 2 files changed +10
-10
lines changed
src/java.base/share/classes/java/util
2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (c) 1997, 2019 , Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 1997, 2020 , Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
47
47
* without incurring the increased cost associated with {@link TreeMap}. It
48
48
* can be used to produce a copy of a map that has the same order as the
49
49
* original, regardless of the original map's implementation:
50
- * <pre>
51
- * void foo(Map m) {
52
- * Map copy = new LinkedHashMap(m);
50
+ * <pre>{@code
51
+ * void foo(Map<String, Integer> m) {
52
+ * Map<String, Integer> copy = new LinkedHashMap<> (m);
53
53
* ...
54
54
* }
55
- * </pre>
55
+ * } </pre>
56
56
* This technique is particularly useful if a module takes a map on input,
57
57
* copies it, and later returns results whose order is determined by that of
58
58
* the copy. (Clients generally appreciate having things returned in the same
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (c) 2000, 2019 , Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2000, 2020 , Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
42
42
* increased cost associated with {@link TreeSet}. It can be used to
43
43
* produce a copy of a set that has the same order as the original, regardless
44
44
* of the original set's implementation:
45
- * <pre>
46
- * void foo(Set s) {
47
- * Set copy = new LinkedHashSet(s);
45
+ * <pre>{@code
46
+ * void foo(Set<String> s) {
47
+ * Set<String> copy = new LinkedHashSet<> (s);
48
48
* ...
49
49
* }
50
- * </pre>
50
+ * } </pre>
51
51
* This technique is particularly useful if a module takes a set on input,
52
52
* copies it, and later returns results whose order is determined by that of
53
53
* the copy. (Clients generally appreciate having things returned in the same
You can’t perform that action at this time.
0 commit comments