private String prepareVariableName(String variableName) { variableName = StringUtils.replaceWhitespaces(variableName, ""); return variableName; }
private String getLookupValue(String value) { if (!caseSensitiveMatching) { value = value.toLowerCase(); } if (!whiteSpaceSensitiveMatching) { value = StringUtils.replaceWhitespaces(value, ""); } return value; }
private String prepareFormula(String formula) { // replace whitespaces to normalize variable names (which MAY contain // spaces in the raw input-formula), and to trim before evaluating. formula = StringUtils.replaceWhitespaces(formula, ""); if (formula.indexOf("#{") == -1) { formula = "#{" + formula + "}"; } return formula; }
private static String normalizeStringForMatching(final String str) { return StringUtils.replaceWhitespaces(str, "").toLowerCase(); }
/** * Gets the "href" attribute content if a link to this component should be * made from elsewhere in the component docs. * * @return */ public String getHref() { final String displayName = _componentDescriptor.getDisplayName(); final String filename = StringUtils.replaceWhitespaces(displayName.toLowerCase().trim(), "_").replaceAll("\\/", "_") .replaceAll("\\\\", "_"); return filename + ".html"; } }
@Initialize public void init() { _factory = new ExpressionFactoryImpl(); _columnAliases = new HashMap<>(); int i = 1; for (final InputColumn<Number> inputColumn : _input) { final String name = inputColumn.getName(); final List<String> list = new ArrayList<>(3); final String variableName1 = StringUtils.replaceWhitespaces(name.toLowerCase(), "_"); final String variableName2 = StringUtils.replaceWhitespaces(name.toLowerCase(), ""); list.add(variableName1); list.add(variableName2); list.add("col" + i); i++; _columnAliases.put(name, list); } }
stringValue = StringUtils.replaceWhitespaces(stringValue, "");
public String transform(String value) { if (value == null) { return null; } if (trimLeft && trimRight) { value = value.trim(); } else { if (trimLeft) { value = StringUtils.leftTrim(value); } if (trimRight) { value = StringUtils.rightTrim(value); } } if (trimMultipleToSingleSpace) { value = StringUtils.replaceWhitespaces(value, " "); } return value; } }
string = StringUtils.replaceWhitespaces(string, ""); string = StringUtils.replaceAll(string, "-", ""); string = StringUtils.replaceAll(string, "_", "");
@Override public String evaluate(final InputRow row) { final SimpleContext context = new SimpleContext(); final List<InputColumn<?>> inputColumns = row.getInputColumns(); for (final InputColumn<?> inputColumn : inputColumns) { if (!(inputColumn instanceof ExpressionBasedInputColumn)) { final Object value = row.getValue(inputColumn); final Class<?> javaType = inputColumn.getDataType(); final ValueExpression valueExpression = _factory.createValueExpression(value, javaType); String variableName = inputColumn.getName(); variableName = StringUtils.replaceWhitespaces(variableName, "_"); context.setVariable(variableName, valueExpression); } } try { final ValueExpression valueExpression = _factory.createValueExpression(context, _expression, String.class); return (String) valueExpression.getValue(context); } catch (final ELException e) { logger.error("Could not evaluate EL expression", e); return null; } }
String name = sourceColumn.getName(); if (name != null) { name = StringUtils.replaceWhitespaces(name, ""); name = StringUtils.replaceAll(name, "_", ""); name = StringUtils.replaceAll(name, "-", "");