Returns the empty immutable set. Preferred over Collections#emptySet for code consistency, and because the return type conveys the immutability guarantee.
()
| 48 | * consistency, and because the return type conveys the immutability guarantee. |
| 49 | */ |
| 50 | @SuppressWarnings({"unchecked"}) // fully variant implementation (never actually produces any Es) |
| 51 | public static <E> ImmutableSet<E> of() { |
| 52 | return (ImmutableSet<E>) RegularImmutableSet.EMPTY; |
| 53 | } |
| 54 | |
| 55 | /** |
| 56 | * Returns an immutable set containing {@code element}. Preferred over {@link |
no test coverage detected