當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。