jw
11/01/2017, 9:43 PMkarelpeeters
11/01/2017, 11:22 PMEnumSet.of already in the Java standard library?jw
11/01/2017, 11:24 PMkarelpeeters
11/01/2017, 11:26 PMjw
11/01/2017, 11:33 PMsetOf, but the all case isn't coveredkarelpeeters
11/01/2017, 11:40 PMsetOf(*MyEnum.values()), could be cleaner of course.karelpeeters
11/01/2017, 11:40 PMjw
11/01/2017, 11:43 PMjw
11/01/2017, 11:43 PMjw
11/01/2017, 11:43 PMMyEnum.values().toSet()kevinmost
11/02/2017, 12:23 AMSet, not an EnumSet? Wouldn't you want some specialized version that gives you the EnumSet?jw
11/02/2017, 12:28 AMkevinmost
11/02/2017, 1:07 AMEnumSet, and when called elsewhere, gives you just a normal Set? Maybe setOf could check if the elements it's being passed are `Enum`s and make an EnumSet if so. But that doesn't cover the case of creating an empty mutable set, of course