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:org.jclouds.ecs.domain.IpState.java

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

From source file:org.jclouds.vcloud.domain.network.FenceMode.java

public static FenceMode fromValue(String fenceMode) {
    try {//w  w  w .  ja  v  a2 s. co m
        return valueOf(
                CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(fenceMode, "fenceMode")));
    } 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:org.jclouds.cloudstack.domain.StorageType.java

@Override
public String toString() {
    return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, name());
}

From source file:org.jclouds.cloudstack.domain.SystemVmType.java

@Override
public String toString() {
    return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, name()).toLowerCase();
}

From source file:com.github.ko2ic.plugin.eclipse.taggen.common.domain.valueobject.NameRuleString.java

public String phraseVariableName() {
    String value = str;//from  www.  ja v  a2s .  com
    if (Character.isUpperCase(str.charAt(0))) {
        if (str.contains("_")) {
            value = CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, str);
        } else {
            value = CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_CAMEL, str);
        }
    } else {
        if (str.contains("_")) {
            value = CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, str);
        }
    }
    return value;
}

From source file:org.jclouds.glesys.domain.ServerState.java

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

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

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

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

/**
 * Obtains an instance from the specified unique name.
 * //from   w ww . ja va2  s.  co m
 * @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));
}