public final @NotNull Set<E> toSet() {
    if (this == EMPTY) return Collections.emptySet();
    E single = asElement();
    if (single != null) return Collections.singleton(single);
    LinkedHashSet<E> result = ContainerUtil.newLinkedHashSet(this);
    return result.isEmpty() ? Collections.emptySet() : Collections.unmodifiableSet(result);
  }
public final @NotNull Set<E> toSet()