当前位置: 首页>>代码示例>>Java>>正文


Java StringUtils.equalsAnyIgnoreCase方法代码示例

本文整理汇总了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);
}
 
开发者ID:hpgary,项目名称:mylion-mvn,代码行数:12,代码来源:ResultType.java

示例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;
}
 
开发者ID:ligoj,项目名称:plugin-prov-aws,代码行数:50,代码来源:ProvAwsPriceImportResource.java

示例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");
}
 
开发者ID:Erudika,项目名称:scoold,代码行数:4,代码来源:ScooldUtils.java


注:本文中的org.apache.commons.lang3.StringUtils.equalsAnyIgnoreCase方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。