<p>_transform.</p>

@param set a {@link java.util.Set} object.
@return a {@link java.util.Set} object.
774441
@SuppressWarnings("unchecked")
    protected Set _transform(final Set set) {
        if (set == null) return null;
        if (set instanceof BeanSet) return set;
        return new BeanSet<>(set, this);
    }
309734
public static <E> Set<E> union(final Set<? extends E> set1, final Set<? extends E> set2) {
        checkArgumentNotNull(set1, "set1");
        checkArgumentNotNull(set2, "set2");

        // Set 2 minus set 1
        final Set<E> difference = new HashSet<>(set2);
        difference.removeAll(set1);
        // Following stream does not compile on some JDKs
        // See also https://bugs.openjdk.java.net/browse/JDK-8051443
        // set2.stream().filter((e) -> !set1.contains(e)).collect(Collectors.toSet());

        return new AbstractSet<E>() {

            @Override
            public Iterator<E> iterator() {
                final Iterator<E> iterator = Iterators.concat(ImmutableList.of(set1.iterator(), difference.iterator()).iterator());
                // Remove operation is not supported by default
                return new Iterator<E>() {
                    @Override
                    public boolean hasNext() {
                        return iterator.hasNext();
                    }

                    @Override
                    public E next() {
                        return iterator.next();
                    }
                };
            }

            @Override
            public int size() {
                return set1.size() + difference.size();
            }

            @Override
            public boolean isEmpty() {
                return set1.isEmpty() && difference.isEmpty();
            }

            @Override
            public boolean contains(Object o) {
                return set1.contains(o) || difference.contains(o);
            }
        };
    }
479852
public ExampleSet copy() {
        ExampleSet copy = new VectorSet();
        for (int i = 0; i < size(); i++)
            copy.add(x(i), y(i), id(i));

        return copy;
    }
672323
public static <T> Set<T> asImmutable(Set<T> self) {
        return asUnmodifiable(new LinkedHashSet<T>(self));
    }
36003
public static <E> Set<E> union(Set<E> s1, Set<E> s2) {
    Set<E> s = new HashSet<E>();
    s.addAll(s1);
    s.addAll(s2);
    return s;
  }
824503
public static Set<?> convertArrayToSet(Object[] source) {
        Set<Object> set = new HashSet<Object>();
        for (Object element : source) {
            set.add(element);
        }
        return set;
    }
280783
@SuppressWarnings("unchecked")
    public <T> Set<T> getSet(String key) {
        return Reflection.toType(get(key), Set.class);
    }
305158
public static <T> PowerSet<T> getPowerSet(Set<T> hashSet) {
		Validate.notNull(hashSet);
		if (hashSet.isEmpty())
			throw new IllegalArgumentException("set size 0");
		HashList<T> hashList = new HashList<>(hashSet);
		PowerSet<T> result = new PowerSet<>(hashList.size());
		for (int i = 0; i < Math.pow(2, hashList.size()); i++) {
			int setSize = Integer.bitCount(i);
			HashSet<T> newList = new HashSet<>(setSize);
			result.get(setSize).add(newList);
			for (int j = 0; j < hashList.size(); j++) {
				if ((i & (1 << j)) != 0) {
					newList.add(hashList.get(j));
				}
			}
		}
		return result;
	}
1180476
public static <T> Set<T> union(Collection<Set<T>> sets) {
		Set<T> result = new HashSet<>();
		if (sets.isEmpty()) {
			return result;
		}
		Iterator<Set<T>> iter = sets.iterator();
		result.addAll(iter.next());

		if (sets.size() == 1) {
			return result;
		}

		while (iter.hasNext()) {
			result.addAll(iter.next());
		}
		return result;
	}
11255
public static <T> Set<T> union(Set<T> setA, Set<T> setB) {
        Set<T> union = new HashSet<T>(setA);
        union.addAll(setB);
        return union;
    }
1282225
public final void mSET() throws RecognitionException {
		try {
			int _type = SET;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// hql.g:59:5: ( 'set' )
			// hql.g:59:7: 'set'
			{
			match("set"); if (state.failed) return;

			}

			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
700175
public final Set<K> keySet() {
	return new AbstractSet<K>() {
	    public Iterator<K> iterator() {
		final Iterator<Map.Entry<K,V>> ite = entryIterator();
		return new Iterator<K>() {
		    public boolean hasNext() { return ite.hasNext(); }
		    public void    remove()  { ite.remove(); }
		    public K       next()    { return ite.next().getKey(); }
		};
	    }
	    public int size() {
		return size;
	    }
	};
    }
226258
public static <P, R> Set<R> transform(Set<P> elements, Function<P, R> transformer) {
        return Sets.newHashSet(transform(newArrayList(elements), transformer));
    }
1068409
public Set<K> keySet()
  {
    if (TraceComponent.isAnyTracingEnabled() && _tc.isEntryEnabled()) SibTr.entry(this, _tc, "keySet");
    
    UnsupportedOperationException uoe = new UnsupportedOperationException();
    
    if (TraceComponent.isAnyTracingEnabled() && _tc.isEntryEnabled()) SibTr.exit(this, _tc, "keySet", uoe);
    throw uoe;
  }
326267
public static Set<String> getSet(AbstractConfig config, String key) {
    List<String> value = config.getList(key);
    return ImmutableSet.copyOf(value);
  }
184873
public static final <K,V> MapSet<K,V> unmodifiableMapSet(MapSet<K,V> set)
    {
        return new UnmodifiableMapSet(set);
    }
478084
@SuppressWarnings("unchecked")
    @NonNull
    public static <T> Set<T> unmodifiableNonNullSet(@Nullable Set<T> set) {
        return set == null || set.isEmpty()
                ? (Set<T>) emptySet()
                : Collections.unmodifiableSet(set);
    }