Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
驚くべきことに単純なコンストラクターがなく、そのメソッドが null 値を好まないため、EnumSet に苦労しています。
私が思いついたもの: EnumSet<MyClass> x = EnumSet.copyOf(Collections.<MyClass>emptySet());
EnumSet<MyClass> x = EnumSet.copyOf(Collections.<MyClass>emptySet());
これは多少機能しますが、私には正しくないようです。
EnumSet.noneOf(Class)空の EnumSet を作成するために使用します。
EnumSet.noneOf(Class)