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:org.jclouds.fujitsu.fgcp.domain.BuiltinServerStatus.java

public static BuiltinServerStatus fromValue(String status) {
    try {//  w w  w .  ja  va  2  s . c om
        return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(status, "status")));
    } catch (IllegalArgumentException e) {
        return UNRECOGNIZED;
    }
}

From source file:com.opengamma.strata.finance.rate.swap.NegativeRateMethod.java

/**
 * Obtains the type from a unique name.//from   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 NegativeRateMethod of(String uniqueName) {
    ArgChecker.notNull(uniqueName, "uniqueName");
    return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, uniqueName));
}

From source file:com.opengamma.strata.basics.index.FloatingRateType.java

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

From source file:com.noorq.casser.mapping.convert.CamelCaseToUnderscoreConverter.java

@Override
public String apply(String source) {

    if (source == null) {
        throw new IllegalArgumentException("empty parameter");
    }//from  www. ja  v a2s .  c o  m

    return CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, source);
}

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

public String toString() {
    return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, name());
}

From source file:fr.obeo.intent.spec2test.services.NamedElementUtils.java

/**
 * Returns the element name in camel case
 * //from   ww w. j a va 2 s . c  om
 * @param namedElement
 *            Named element
 * @return the element name in camel case
 */
public String getCamelCaseName(NamedElement namedElement) {
    String name = namedElement.getName().replaceAll(" ", "_");
    return CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, name);
}

From source file:org.jclouds.vcloud.domain.AllocationModel.java

public static AllocationModel fromValue(String model) {
    try {/*from w ww.j  a  v a  2 s .com*/
        return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(model, "model")));
    } catch (IllegalArgumentException e) {
        return UNRECOGNIZED;
    }
}

From source file:org.jclouds.azure.management.domain.DeploymentStatus.java

public String value() {
    return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, name());
}

From source file:org.jclouds.aws.cloudwatch.domain.StandardUnit.java

public String value() {
    return (CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, name().replace("_PER_", "/")));
}

From source file:com.opengamma.strata.measure.fxopt.FxSingleBarrierOptionMethod.java

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