本文整理汇总了Java中org.apache.commons.lang3.StringUtils.equalsAnyIgnoreCase方法的典型用法代码示例。如果您正苦于以下问题:Java StringUtils.equalsAnyIgnoreCase方法的具体用法?Java StringUtils.equalsAnyIgnoreCase怎么用?Java StringUtils.equalsAnyIgnoreCase使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.commons.lang3.StringUtils
的用法示例。
在下文中一共展示了StringUtils.equalsAnyIgnoreCase方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getMethodName
import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
protected String getMethodName(String field, String type, MethodType methodType) {
if (methodType == MethodType.READ) {
String readHead = "get";
if (StringUtils.equalsAnyIgnoreCase("Boolean", type)) {
readHead = "is";
}
return readHead + StringTools.toClassName(field);
}
String writeHead = "set";
return writeHead + StringTools.toClassName(field);
}
示例2: install
import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
/**
* Install the install the instance type (if needed), the instance price type
* (if needed) and the price.
*
* @param csv
* The current CSV entry.
* @param instances
* The previously installed instance types. Key is the instance name.
* @param priceTypes
* The previously installed price types.
* @param partialCost
* The current partial cost for up-front options.
* @param node
* The related {@link Node}
* @param region
* The current region.
* @param previous
* The previous installed prices.
* @return The amount of installed prices. Only for the report.
*/
private int install(final AwsEc2Price csv, final Map<String, ProvInstanceType> instances,
final Map<String, ProvInstancePriceTerm> priceTypes, final Map<String, ProvInstancePrice> partialCost, final Node node,
final ProvLocation region, final Map<String, ProvInstancePrice> previous) {
// Upfront, partial or not
int priceCounter = 0;
if (StringUtils.equalsAnyIgnoreCase(csv.getPurchaseOption(), "All Upfront", "Partial Upfront")) {
final String code = csv.getSku() + csv.getOfferTermCode();
if (partialCost.containsKey(code)) {
final ProvInstancePrice ipUpfront = partialCost.get(code);
handleUpfront(csv, ipUpfront);
// The price is completed, cleanup and persist
partialCost.remove(code);
priceCounter++;
ipRepository.save(ipUpfront);
} else {
// First time, save this instance for a future completion
handleUpfront(csv,
partialCost.computeIfAbsent(code, k -> newInstancePrice(csv, instances, priceTypes, node, region, previous)));
}
} else {
// No leasing, cost is fixed
priceCounter++;
final ProvInstancePrice price = newInstancePrice(csv, instances, priceTypes, node, region, previous);
price.setCost(csv.getPricePerUnit());
ipRepository.save(price);
}
return priceCounter;
}
示例3: isLanguageRTL
import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
public boolean isLanguageRTL(String langCode) {
return StringUtils.equalsAnyIgnoreCase(langCode, "ar", "he", "dv", "iw", "fa", "ps", "sd", "ug", "ur", "yi");
}