Example usage for org.apache.commons.lang StringUtils upperCase

List of usage examples for org.apache.commons.lang StringUtils upperCase

Introduction

In this page you can find the example usage for org.apache.commons.lang StringUtils upperCase.

Prototype

public static String upperCase(String str, Locale locale) 

Source Link

Document

Converts a String to upper case as per String#toUpperCase(Locale) .

Usage

From source file:org.osframework.contract.date.fincal.definition.CentralBank.java

/**
 * Set ISO-3166 country code for this central bank.
 * //w w w .  j av  a 2  s.c  om
 * @param country ISO-3166 country code for this central bank
 * @throws IllegalArgumentException if country is not a supported ISO-3166
 *         alpha2 country code
 */
public void setCountry(String country) {
    if (StringUtils.isBlank(country) || (2 != StringUtils.length(country.trim()))) {
        throw new IllegalArgumentException("Invalid ISO-3166 alpha2 country code");
    }
    this.country = StringUtils.upperCase(country.trim(), Locale.ENGLISH);
}

From source file:org.sonar.db.user.GroupDao.java

@CheckForNull
private static String groupSearchToSql(@Nullable String query) {
    if (query == null) {
        return null;
    }/*from   ww w  . j  a v a 2 s  . co m*/

    String upperCasedNameQuery = StringUtils.upperCase(query, Locale.ENGLISH);
    return DaoDatabaseUtils.buildLikeValue(upperCasedNameQuery, WildcardPosition.BEFORE_AND_AFTER);
}