private static <E> Set<E> asSet(E... elements) {
        if (elements == null || elements.length == 0) {
            return Collections.emptySet();
        }

        if (elements.length == 1) {
            return Collections.singleton(elements[0]);
        }

        LinkedHashSet<E> set = new LinkedHashSet<E>(elements.length * 4 / 3 + 1);
        Collections.addAll(set, elements);
        return set;
    }
Returns the input argument, but ensures the first character is capitalized (if possible).
@param in the string to uppercase the first character.
@return the input argument, but with the first character capitalized (if possible).
@since 1.2
src/main/java/org/apache/shiro/lang/util/StringUtils.java