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

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

Introduction

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

Prototype

CaseFormat UPPER_UNDERSCORE

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

Click Source Link

Document

Java and C++ constant naming convention, e.g., "UPPER_UNDERSCORE".

Usage

From source file:com.opengamma.strata.product.swap.IborRateAveragingMethod.java

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

From source file:com.opengamma.strata.product.swaption.CashSwaptionSettlementMethod.java

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

From source file:com.opengamma.strata.pricer.common.PriceType.java

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

From source file:com.opengamma.integration.tool.portfolio.xml.v1_0.jaxb.OptionTypeAdapter.java

@Override
public String marshal(OptionType v) throws Exception {
    return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, v.name());
}

From source file:org.jclouds.vcloud.domain.network.nat.rules.MappingMode.java

public static MappingMode fromValue(String mode) {
    try {/*from   ww  w .j a  va  2  s  .  co  m*/
        return valueOf(CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(mode, "mode")));
    } catch (IllegalArgumentException e) {
        return UNRECOGNIZED;
    }
}

From source file:com.opengamma.strata.product.swap.IborRateResetMethod.java

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

From source file:org.jclouds.cloudwatch.domain.ComparisonOperator.java

public static ComparisonOperator fromValue(String value) {
    try {/*from   ww  w.  java2  s  .  co m*/
        return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(value, "value")));

    } catch (IllegalArgumentException e) {
        return UNRECOGNIZED;
    }
}

From source file:org.jclouds.vcloud.domain.network.nat.NatPolicy.java

public static NatPolicy fromValue(String policy) {
    try {/*from  w  w w.  ja  v a2  s . c  o m*/
        return valueOf(CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(policy, "policy")));
    } catch (IllegalArgumentException e) {
        return UNRECOGNIZED;
    }
}

From source file:org.jclouds.fujitsu.fgcp.domain.VServerStatus.java

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

From source file:org.jclouds.fujitsu.fgcp.domain.PublicIPStatus.java

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