MCPcopy Create free account
hub / github.com/ReadyTalk/avian / copyOf

Method copyOf

classpath/java/util/EnumSet.java:90–95  ·  view source on GitHub ↗
(EnumSet<T> s)

Source from the content-addressed store, hash-verified

88 }
89
90 public static <T extends Enum<T>>EnumSet<T> copyOf(EnumSet<T> s) {
91 EnumSet<T> enumSet = createEmptyEnumSet(s.elementType);
92 enumSet.bitset.or(s.bitset);
93
94 return enumSet;
95 }
96
97 private static <T extends Enum<T>>EnumSet<T> createEmptyEnumSet(Class<T> elementType) {
98 T[] constants = elementType.getEnumConstants();

Callers 2

testCopyOfMethod · 0.95
complementOfMethod · 0.95

Calls 2

createEmptyEnumSetMethod · 0.95
orMethod · 0.80

Tested by 1

testCopyOfMethod · 0.76