Returns an Immutable version of powerset where the inner sets are also immutable.
425651
public static <T> ImmutableSet<ImmutableSet<T>> immutablePowerSet(Set<T> set)
    {
        return powerSet(set).collect(new Function<MutableSet<T>, ImmutableSet<T>>()
        {
            public ImmutableSet<T> valueOf(MutableSet<T> set)
            {
                return set.toImmutable();
            }
        }).toImmutable();
    }
239822
public static <T> Set<T> getRandomSubset(Set<T> set) {
		return getRandomSubsetMax(set, set.size());
	}
11846
public static <T> SortedSet<T> asUnmodifiable(SortedSet<T> self) {
        return Collections.unmodifiableSortedSet(self);
    }
393329
def to_immutable(self):
        """"""
        if self._enumeration is None:
            self._get_mutable_enumeration()
        col_obj = self._enumeration['immutable'][self._collection_type]
        return col_obj(self.header, self.values)
1323779
public static <K, V> ImmutableSet<V> getAllAsSet(final Multimap<K, V> multimap,
      final Iterable<K> keys) {
    final ImmutableSet.Builder<V> ret = ImmutableSet.builder();
    for (final K key : keys) {
      ret.addAll(multimap.get(key));
    }
    return ret.build();
  }
395280
def power(set_):
    
    ensure_countable(set_)

    result = chain.from_iterable(combinations(set_, r)
                                 for r in xrange(len(set_) + 1))
    return _harmonize_subset_types(set_, result)
898332
@Inline(value="$2.$3copyOf($1)", imported=ImmutableSet.class)
	public static <T> Set<T> immutableCopy(Set<? extends T> set) {
		return ImmutableSet.copyOf(set);
	}
851472
public Set<List<K>> keySet() {
    return ErasureUtils.<Set<List<K>>>uncheckedCast(keySet(new HashSet<Object>(), zeroKey, true));
  }
499043
public Set<Map.Entry<A,B>> entrySet() {
	return new AbstractSet<Map.Entry<A,B>>() {
	    public int size() {
		return map.size();
	    }
	    public Iterator<Map.Entry<A,B>> iterator() {
		return new Iterator<Map.Entry<A,B>>() {
		    private final Iterator<Map.Entry<A,B>> it = map.entrySet().iterator();
		    private Map.Entry<A,B> last = null;
		    public boolean hasNext() {
			return it.hasNext(); 
		    }
		    public Map.Entry<A,B> next() { 
		        last = it.next();
			return last;
		    }
		    public void remove() {
			it.remove();
			revMap.remove(last.getValue());
		    }
		};
	    }
	    public boolean remove(Object o) {
		if(!(o instanceof Map.Entry/*<A,B>*/)) return false;
		@SuppressWarnings("unchecked")
		Map.Entry<A,B> entry = (Map.Entry<A,B>) o;
		B currValue = BijMap.this.get(entry.getKey());
		if((currValue == null) || !currValue.equals(entry.getValue())) return false;
		BijMap.this.remove(entry.getKey());
		return true;
	    }
	    public void clear() {
		BijMap.this.clear();
	    }
	};
    }
1046983
def copy(self):
        """"""
        return self._fromset(set(self._set), key=self._key)
1150530
public static <T> Set<T> unmodifiableSet(Set<? extends T> s) {
		return Collections.unmodifiableSet(s);
	}
540791
public static ImmutableSet<Symbol> setFrom(final Iterable<String> strings) {
    checkNotNull(strings);

    return FluentIterable.from(strings)
        .transform(Symbolize)
        .toSet();
  }
1093138
public static <T> Set<T> immutableSetConvert(Collection<? extends T> collection) {
      return immutableSetWrap(new HashSet<T>(collection));
   }
790443
def powerset(self, start=None, excludestart=False):
        """"""
        if start is None:
            start = self.infimum
            other = self.atoms()
        else:
            if self | start != self:
                raise ValueError('%r is no subset of %r' % (start, self))
            other = self.fromint(self & ~start).atoms()
        return map(self.frombitset, combos.shortlex(start, list(other)))
1014536
public static <K, V> ImmutableSetMultimap<K, V> indexToSetMultimapWithMultipleKeys(
      Iterable<? extends V> values, Function<? super V, ? extends Collection<? extends K>> keyFunction) {
    final ImmutableSetMultimap.Builder<K,V> ret = ImmutableSetMultimap.builder();

    for (final V value : values) {
      // nulls banned by contract
      //noinspection ConstantConditions
      for (K key : keyFunction.apply(value)) {
        ret.put(key, value);
      }
    }

    return ret.build();
  }
203197
public Set<T> internAll(Set<T> s) {
    Set<T> result = Generics.newHashSet();
    for (T o : s) {
      result.add(intern(o));
    }
    return result;
  }
94620
@Override
    public <O extends Comparable> Set<O> transform(Set<O> set) {
        return checkNotNull(set);
    }