Java Code Examples for org.apache.commons.lang3.StringUtils.equalsAnyIgnoreCase()

The following are Jave code examples for showing how to use equalsAnyIgnoreCase() of the org.apache.commons.lang3.StringUtils class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: mylion-mvn   File: ResultType.java   View Source Code Vote up 5 votes
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);
}
 
Example 2
Project: mylion-mvn   File: ResultType.java   View Source Code Vote up 5 votes
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);
}
 
Example 3
Project: plugin-prov-aws   File: ProvAwsPriceImportResource.java   View Source Code Vote up 5 votes
/**
 * 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;
}
 
Example 4
Project: scoold   File: ScooldUtils.java   View Source Code Vote up 4 votes
public boolean isLanguageRTL(String langCode) {
	return StringUtils.equalsAnyIgnoreCase(langCode, "ar", "he", "dv", "iw", "fa", "ps", "sd", "ug", "ur", "yi");
}