- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for immutableEnumSet (0.06 sec)
-
guava-tests/test/com/google/common/collect/SetsTest.java
Set<SomeEnum> units = Sets.immutableEnumSet(SomeEnum.D, SomeEnum.B); assertThat(units).containsExactly(SomeEnum.B, SomeEnum.D).inOrder(); Set<SomeEnum> copy = SerializableTester.reserializeAndAssert(units); assertTrue(copy instanceof ImmutableEnumSet); } public void testImmutableEnumSet_fromIterable() { ImmutableSet<SomeEnum> none = Sets.immutableEnumSet(MinimalIterable.<SomeEnum>of());
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 48.6K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Sets.java
public static <E extends Enum<E>> ImmutableSet<E> immutableEnumSet(Iterable<E> elements) { if (elements instanceof ImmutableEnumSet) { return (ImmutableEnumSet<E>) elements; } else if (elements instanceof Collection) { Collection<E> collection = (Collection<E>) elements; if (collection.isEmpty()) { return ImmutableSet.of(); } else { return ImmutableEnumSet.asImmutable(EnumSet.copyOf(collection));
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 14:28:19 UTC 2024 - 78.8K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/CollectCollectors.java
return this; } } ImmutableSet<E> toImmutableSet() { if (set == null) { return ImmutableSet.of(); } ImmutableSet<E> ret = ImmutableEnumSet.asImmutable(set); set = null; // subsequent manual manipulation of the accumulator mustn't affect ret return ret; } } @GwtIncompatible @SuppressWarnings({"rawtypes", "unchecked"})
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:05:46 UTC 2024 - 17.1K bytes - Viewed (0)