Example usage for com.google.common.base CaseFormat UPPER_CAMEL

List of usage examples for com.google.common.base CaseFormat UPPER_CAMEL

Introduction

In this page you can find the example usage for com.google.common.base CaseFormat UPPER_CAMEL.

Prototype

CaseFormat UPPER_CAMEL

To view the source code for com.google.common.base CaseFormat UPPER_CAMEL.

Click Source Link

Document

Java and C++ class naming convention, e.g., "UpperCamel".

Usage

From source file:com.opengamma.strata.product.cms.CmsPeriodType.java

/**
 * Obtains the type from a unique name.//from   w w w .  j  a  va  2 s  . com
 * 
 * @param uniqueName  the unique name
 * @return the type
 * @throws IllegalArgumentException if the name is not known
 */
@FromString
public static CmsPeriodType of(String uniqueName) {
    ArgChecker.notNull(uniqueName, "uniqueName");
    return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, uniqueName));
}

From source file:com.opengamma.basics.PutCall.java

/**
 * Obtains the type from a unique name./*from  w  w w  .j  a  v  a2 s.co m*/
 * 
 * @param uniqueName  the unique name
 * @return the type
 * @throws IllegalArgumentException if the name is not known
 */
@FromString
public static PutCall of(String uniqueName) {
    ArgChecker.notNull(uniqueName, "uniqueName");
    return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, uniqueName));
}

From source file:com.opengamma.strata.product.credit.type.AccrualStart.java

/**
 * Obtains an instance from the specified unique name.
 * /*w w w. ja v a  2s  .  c o m*/
 * @param uniqueName  the unique name
 * @return the type
 * @throws IllegalArgumentException if the name is not known
 */
@FromString
public static AccrualStart of(String uniqueName) {
    ArgChecker.notNull(uniqueName, "uniqueName");
    return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, uniqueName));
}

From source file:org.jclouds.ecs.domain.IpState.java

public static IpState fromValue(String state) {
    try {/*from   www.  j  ava2  s  . co  m*/
        return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(state, "state")));
    } catch (IllegalArgumentException e) {
        return UNRECOGNIZED;
    }
}

From source file:com.opengamma.basics.LongShort.java

/**
 * Obtains the type from a unique name.//from   www  .  j a v a 2s.  c om
 * 
 * @param uniqueName  the unique name
 * @return the type
 * @throws IllegalArgumentException if the name is not known
 */
@FromString
public static LongShort of(String uniqueName) {
    ArgChecker.notNull(uniqueName, "uniqueName");
    return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, uniqueName));
}

From source file:com.opengamma.strata.market.curve.CurveNodeClashAction.java

/**
 * Obtains an instance from the specified unique name.
 * // w w w .  j  a v  a  2 s  .c  o  m
 * @param uniqueName  the unique name
 * @return the type
 * @throws IllegalArgumentException if the name is not known
 */
@FromString
public static CurveNodeClashAction of(String uniqueName) {
    ArgChecker.notNull(uniqueName, "uniqueName");
    return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, uniqueName));
}

From source file:com.opengamma.strata.product.common.PayReceive.java

/**
 * Obtains an instance from the specified unique name.
 * //from w w  w .  j  ava 2  s  .  c om
 * @param uniqueName  the unique name
 * @return the type
 * @throws IllegalArgumentException if the name is not known
 */
@FromString
public static PayReceive of(String uniqueName) {
    ArgChecker.notNull(uniqueName, "uniqueName");
    return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, uniqueName));
}

From source file:com.opengamma.strata.product.credit.PaymentOnDefault.java

/**
 * Obtains an instance from the specified unique name.
 * //from  w w  w . j  a v  a  2 s .  c o m
 * @param uniqueName  the unique name
 * @return the type
 * @throws IllegalArgumentException if the name is not known
 */
@FromString
public static PaymentOnDefault of(String uniqueName) {
    ArgChecker.notNull(uniqueName, "uniqueName");
    return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, uniqueName));
}

From source file:com.google.api.codegen.LanguageUtil.java

public static String upperCamelToUpperUnderscore(String name) {
    name = CommonAcronyms.camelizeUpperAcronyms(name);
    return CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, name);
}

From source file:com.opengamma.strata.product.credit.ProtectionStartOfDay.java

/**
 * Obtains an instance from the specified unique name.
 * //  ww  w  . ja va2s.co m
 * @param uniqueName  the unique name
 * @return the type
 * @throws IllegalArgumentException if the name is not known
 */
@FromString
public static ProtectionStartOfDay of(String uniqueName) {
    ArgChecker.notNull(uniqueName, "uniqueName");
    return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, uniqueName));
}