MCPcopy Create free account
hub / github.com/antlr/codebuff / newEnumSet

Method newEnumSet

output/java_guava/1.4.16/Sets.java:147–151  ·  view source on GitHub ↗

Returns a new, mutable EnumSet instance containing the given elements in their natural order. This method behaves identically to EnumSet#copyOf(Collection), but also accepts non-Collection iterables and empty iterables.

(Iterable<E> iterable, Class<E> elementType)

Source from the content-addressed store, hash-verified

145
146
147 public static <E extends Enum<E>> EnumSet<E> newEnumSet(Iterable<E> iterable, Class<E> elementType) {
148 EnumSet<E> set = EnumSet.noneOf(elementType);
149 Iterables.addAll(set, iterable);
150 return set;
151 }
152
153 // HashSet
154

Callers

nothing calls this directly

Calls 2

addAllMethod · 0.95
noneOfMethod · 0.45

Tested by

no test coverage detected