mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8284780: Need methods to create pre-sized HashSet and LinkedHashSet
Reviewed-by: naoto, bpb, dfuchs, ascarpino
This commit is contained in:
parent
a941bc2de6
commit
e01cd7c3ed
29 changed files with 147 additions and 47 deletions
|
@ -2640,14 +2640,7 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
|
|||
}
|
||||
|
||||
private static class AvailableCalendarTypes {
|
||||
private static final Set<String> SET;
|
||||
static {
|
||||
Set<String> set = new HashSet<>(3);
|
||||
set.add("gregory");
|
||||
set.add("buddhist");
|
||||
set.add("japanese");
|
||||
SET = Collections.unmodifiableSet(set);
|
||||
}
|
||||
private static final Set<String> SET = Set.of("gregory", "buddhist", "japanese");
|
||||
private AvailableCalendarTypes() {
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue