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.swap.PaymentRelativeTo.java
/** * Obtains an instance from the specified unique name. * //from w ww . j a va 2 s. co m * @param uniqueName the unique name * @return the type * @throws IllegalArgumentException if the name is not known */ @FromString public static PaymentRelativeTo of(String uniqueName) { ArgChecker.notNull(uniqueName, "uniqueName"); return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, uniqueName)); }
From source file:org.jclouds.cloudwatch.domain.Unit.java
public static Unit fromValue(String value) { try {//from ww w .j ava 2 s .c o m return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(value, "value").replace("/", "Per"))); } catch (IllegalArgumentException e) { return UNRECOGNIZED; } }
From source file:org.jclouds.cloudstack.domain.TrafficType.java
public static TrafficType fromValue(String type) { try {//from w ww . j a va 2s . c om return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(type, "type"))); } catch (IllegalArgumentException e) { return UNRECOGNIZED; } }
From source file:com.opengamma.strata.product.swap.FixingRelativeTo.java
/** * Obtains an instance from the specified unique name. * /*from w ww.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 FixingRelativeTo of(String uniqueName) { ArgChecker.notNull(uniqueName, "uniqueName"); return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, uniqueName)); }
From source file:com.opengamma.strata.product.swap.SwapLegType.java
/** * Obtains the type from a unique name.//w w w . ja 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 SwapLegType of(String uniqueName) { ArgChecker.notNull(uniqueName, "uniqueName"); return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, uniqueName)); }
From source file:org.jclouds.fujitsu.fgcp.domain.BuiltinServerStatus.java
public static BuiltinServerStatus fromValue(String status) { try {/*from www . j a v a 2 s . com*/ 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 ww. j ava2 s .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:org.jclouds.ec2.domain.InstanceState.java
public static InstanceState fromValue(String state) { try {/* w w w . ja va 2s.c o m*/ return valueOf(CaseFormat.LOWER_HYPHEN.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(state, "state"))); } catch (IllegalArgumentException e) { return UNRECOGNIZED; } }
From source file:com.opengamma.strata.basics.index.FloatingRateType.java
/** * Obtains an instance from the specified unique name. * /*from ww 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 FloatingRateType 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 lowerUnderscoreToUpperUnderscore(String name) { return CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.UPPER_UNDERSCORE, name); }