List of usage examples for com.google.common.base CaseFormat UPPER_UNDERSCORE
CaseFormat UPPER_UNDERSCORE
To view the source code for com.google.common.base CaseFormat UPPER_UNDERSCORE.
Click Source Link
From source file:com.opengamma.strata.product.credit.RestructuringClause.java
/** * Obtains the type from a unique name./*w w w.j a v a 2 s . co m*/ * * @param uniqueName the unique name * @return the type * @throws IllegalArgumentException if the name is not known */ @FromString public static RestructuringClause of(String uniqueName) { ArgChecker.notNull(uniqueName, "uniqueName"); String str = CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, uniqueName); return valueOf(str.substring(0, str.length() - 4) + "_" + str.substring(str.length() - 4)); }
From source file:datamine.storage.idl.generator.metadata.MetadataFileGenerator.java
public static String getEnumValue(String fieldName) { return CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.UPPER_UNDERSCORE, fieldName); }
From source file:google.registry.model.transfer.TransferStatus.java
public String getXmlName() { return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, toString()); }
From source file:org.jclouds.vcloud.director.v1_5.VCloudDirectorException.java
private static String message(Error error, String from) { Iterable<String> words = Iterables.transform(Splitter.on('_').split(error.getMinorErrorCode()), new Function<String, String>() { @Override/* w w w .j a v a 2 s . c o m*/ public String apply(String input) { return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, input); } }); return String.format(MSG_FMT, Joiner.on(' ').join(words), error.getMajorErrorCode(), from, error.getMessage()); }
From source file:org.jclouds.cloudwatch.domain.Unit.java
public String value() { return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, name()).replace("PerSecond", "/Second"); }
From source file:org.ambraproject.wombat.feed.FeedMetadataField.java
private String getKey() { return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, name()); }
From source file:org.zanata.sync.common.model.SyncOption.java
@JsonValue public String getValue() { return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, this.name()); }
From source file:org.ow2.proactive.scheduling.api.graphql.common.Types.java
public String getName() { return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, name()); }
From source file:com.opengamma.strata.product.swaption.SettlementType.java
/** * Returns the formatted unique name of the type. * /*from ww w .j av a 2 s. c om*/ * @return the formatted string representing the type */ @ToString @Override public String toString() { return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, name()); }
From source file:org.jclouds.cloudstack.domain.TrafficType.java
@Override public String toString() { return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, name()); }