Creates a <code>Set</code> of Symbols from some strings. The returned <code>Set</code> is
immutable.

@param strings No string may be null.
540791
public static ImmutableSet<Symbol> setFrom(final Iterable<String> strings) {
    checkNotNull(strings);

    return FluentIterable.from(strings)
        .transform(Symbolize)
        .toSet();
  }
1204350
@SuppressWarnings(
	{ "unchecked" })
	public static <T> Set<T> toSet(T...args)
	{
		if(args == null || args.length ==0)
			return null;
		
		HashSet<T> set = new HashSet<>(args.length);
		
		fill(set,args);
		return set;
	}
1371034
public static String join(String[] strings) {
        StringBuilder builder = new StringBuilder();
        for (int i = 0; i < strings.length; i++) {
            builder.append(strings[i]);
            if (i + 1 < strings.length) builder.append(",");
        }
        return builder.toString();
    }
367392
@SafeVarargs
  /* #end */
  public static <KType> KTypeScatterSet<KType> from(KType... elements) {
    final KTypeScatterSet<KType> set = new KTypeScatterSet<KType>(elements.length);
    set.addAll(elements);
    return set;
  }
363998
private static String modify(final String str, final String[] set, final boolean expect) {
        final CharSet chars = CharSet.getInstance(set);
        final StringBuilder buffer = new StringBuilder(str.length());
        final char[] chrs = str.toCharArray();
        for (final char chr : chrs) {
            if (chars.contains(chr) == expect) {
                buffer.append(chr);
            }
        }
        return buffer.toString();
    }
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;
			}
		}
	}
92336
public static Set<MediaType> set(String... types) {
        Set<MediaType> set = new HashSet<MediaType>();
        for (String type : types) {
            MediaType mt = parse(type);
            if (mt != null) {
                set.add(mt);
            }
        }
        return Collections.unmodifiableSet(set);
    }
226924
public static StrMatcher charSetMatcher(final char... chars) {
        if (chars == null || chars.length == 0) {
            return NONE_MATCHER;
        }
        if (chars.length == 1) {
            return new CharMatcher(chars[0]);
        }
        return new CharSetMatcher(chars);
    }
835930
public static String[] allUpperCase(String... strings){
		String[] tmp = new String[strings.length];
		for(int idx=0;idx<strings.length;idx++){
			if(strings[idx] != null){
				tmp[idx] = strings[idx].toUpperCase();
			}
		}
		return tmp;
	}
863281
private Set<String> getSet(boolean isInflected) {
    Set<String> set = new HashSet<>();
    for (PatternToken patternToken : patternTokens) {
      boolean acceptInflectionValue = isInflected ? patternToken.isInflected() : !patternToken.isInflected();
      if (acceptInflectionValue && !patternToken.getNegation() && !patternToken.isRegularExpression()
              && !patternToken.isReferenceElement() && patternToken.getMinOccurrence() > 0) {
        String str = patternToken.getString();
        if (!StringTools.isEmpty(str)) {
          set.add(str.toLowerCase());
        }
      }
    }
    return Collections.unmodifiableSet(set);
  }
523146
public static ImmutableSet<Symbol> loadSymbolSet(final CharSource source) throws IOException {
    return ImmutableSet.copyOf(loadSymbolList(source));
  }
1184048
public String encode(String... values) {
    ImmutableMap.Builder<String, String> builder = ImmutableMap.builder();
    int i = 0;
    for (String value : values) {
      builder.put("$" + i++, value);
    }
    // We will get an error if there are named bindings which are not reached by values.
    return instantiate(builder.build());
  }
217336
private Set<String> toSet(String value, String delimiter) {
        if (Strings.isNullOrEmpty(value)) {
            return Collections.emptySet();
        } else {
            Set<String> stringSet = new LinkedHashSet<>();
            String[] values = value.split(delimiter);
            for (String stringValue : values) {
                if (!Strings.isNullOrEmpty(stringValue)) {
                    stringSet.add(stringValue.trim());
                }
            }

            return stringSet;
        }
    }
1059266
public static <T> Set<T> toSet(Iterable<T> items) {
    Set<T> set = new HashSet<T>();
    addAll(set, items);
    return set;
  }
648569
@SafeVarargs
    public static <T> Set<T> newSets(T... values) {
        if(null == values || values.length == 0){
            Assert.notNull(values, "values not is null.");
        }
        return new HashSet<>(Arrays.asList(values));
    }
1297559
public static <T> Set<T> setOf(T... objects) {
        if (objects == null || objects.length == 0) {
            return Collections.emptySet();
        }
        return new HashSet<>(Arrays.asList(objects));
    }
1346929
public static <T> Set<T> newSet(T...contents)
	{
		Set<T> set;

		if(contents == null || contents.length==0)
			return newSet();
		set = newSet(contents.length);
		Collections.addAll(set, contents);
		return set;
	}