Returns an immutable copy of the specified sorted {@code set}.

@param set
the sorted set for which an immutable copy should be created. May not be <code>null</code>.
@return an immutable copy of the specified sorted set.
333935
@Inline(value="$2.$3copyOfSorted($1)", imported=ImmutableSortedSet.class)
	public static <T> SortedSet<T> immutableCopy(SortedSet<T> set) {
		return ImmutableSortedSet.copyOfSorted(set);
	}
1093138
public static <T> Set<T> immutableSetConvert(Collection<? extends T> collection) {
      return immutableSetWrap(new HashSet<T>(collection));
   }
1277693
public Set<SortedSet<T>> allSubsets(final SortedSet<T> set) {
        final Set<SortedSet<T>> subsets = new LinkedHashSet<>();
        allSubsets(set, this.rootNodes, subsets);
        return subsets;
    }
895630
public Set<String> getPropAsCaseInsensitiveSet(String key) {
    return ImmutableSortedSet.copyOf(String.CASE_INSENSITIVE_ORDER, LIST_SPLITTER.split(getProp(key)));
  }
184814
public static IntSet mutableCopyFrom(Set<Integer> mutableSet) {
      if (mutableSet instanceof SingletonIntSet) {
         return mutableSet(((SingletonIntSet) mutableSet).value);
      }
      return new SmallIntSet(mutableSet);
   }
1116129
def _fromset(cls, values, key=None):
        """"""
        sorted_set = object.__new__(cls)
        sorted_set._set = values  # pylint: disable=protected-access
        sorted_set.__init__(key=key)
        return sorted_set
203167
public static <T> Set<T> subSet(Set<T> original, int from, int to) {
        List<T> list = new ArrayList<>(original);
        if (to == -1) {
            to = original.size();
        }
        return new LinkedHashSet<>(list.subList(from, to));
    }
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;
	    }
	};
    }
554418
@SafeVarargs
	protected static Set<String> sortedConcat(Iterable<String>... iterables) {
		final Set<String> set = new TreeSet<>();
		for (final Iterable<String> iterable : iterables) {
			for (final String obj : iterable) {
				set.add(obj);
			}
		}
		return set;
	}
568813
@Override
    public Set keySet() {
        if (keySet != null) {
            return keySet;
        }
        keySet = new AbstractSet() {
            @Override
            public Iterator iterator() {
                return new KeyIterator();
            }            @Override
            public int size() {
                return size;
            }



            @Override
            public boolean contains(final Object o) {
                return containsKey(o);
            }


            @Override
            public boolean remove(final Object o) {
                final Object r = ReferenceMap.this.remove(o);
                return r != null;
            }

            @Override
            public void clear() {
                ReferenceMap.this.clear();
            }

        };
        return keySet;
    }
1150530
public static <T> Set<T> unmodifiableSet(Set<? extends T> s) {
		return Collections.unmodifiableSet(s);
	}
808436
public static <T> SortedSet<T> nullToEmpty(final SortedSet<T> set) {
        return set == null ? N.<T> emptySortedSet() : set;
    }
1301903
@SuppressWarnings("unchecked")
    public static Set<String> deserializeSet(String set) {
        if (set == null || set.equals("")) {
            return new HashSet<String>();
        }
        XStream xstream = new XStream(new DomDriver());
        return (Set<String>) xstream.fromXML(set);
    }
370
public SortedSet<T> firstSubset(SortedSet<T> set) {
        if (this.rootNodes.isEmpty() || set == null || set.isEmpty()) {
            return null;
        }
        return firstSubset(set, this.rootNodes);
    }
440585
@SuppressWarnings("unchecked")
    private static <T> Set<T> cast(Set<?> set) {
        return (Set<T>)set;
    }
852099
public synchronized Set<String> keySet() {
		if(size == 0) {
			return new HashSet<String>(0);
		} else {
			try {
				XAttributeMap map = deserialize();
				return map.keySet();
			} catch (IOException e) {
				e.printStackTrace();
				return null;
			}
		}
	}
223647
public final Set<T> toSet() {
        Set<T> list = new HashSet<T>();
        return into(list);
    }