Append operator and parsed String value with custom decimal separator used in String representation of value
@param operator
@param value
@param decimalSeparator
@return
505921
protected final CALC operator(Class<? extends Operator> operator, String value, char decimalSeparator) {
        return operator(operator, new Num(value, decimalSeparator));
    }
448739
public Expression<String> endsWith(String value) {
		String valueString = "'%" + value + "'";
		return new Expression<String>(this, Operation.like, valueString);
	}
904344
private Format decimalFormat(int fractionPrecision) {
		DecimalFormat format;
		if (fractionPrecision == 0) {
			format = new DecimalFormat("###0");
		} else if (fractionPrecision > 0) {
			StringBuilder formatSb = new StringBuilder();
			formatSb.append("###0.");
			appendChars(formatSb, ZERO_CHARS, fractionPrecision);
			format = new DecimalFormat(formatSb.toString());
		} else {
			format = new DecimalFormat("###0.###");
		}
		return format;
	}
1251566
public static ValueExpression eval( CssFormatter formatter, Expression expr ) {
        expr = expr.unpack( formatter ); // unpack to increase the chance to find a ValueExpression
        if( expr.getClass() == ValueExpression.class ) {
            return (ValueExpression)expr;
        }
        ValueExpression valueEx = new ValueExpression( expr, expr.stringValue( formatter ) );
        valueEx.type = expr.getDataType( formatter );
        valueEx.unit = expr.unit( formatter );
        switch( valueEx.type ) {
            case STRING:
            case BOOLEAN:
                break; //string is already set
            case LIST:
                Operation op = valueEx.op = new Operation( expr, ' ' );
                ArrayList<Expression> operants = expr.listValue( formatter ).getOperands();
                for( int j = 0; j < operants.size(); j++ ) {
                    op.addOperand( ValueExpression.eval( formatter, operants.get( j ) ) );
                }
                break;
            default:
                valueEx.value = expr.doubleValue( formatter );
        }
        return valueEx;
    }
357440
@VisibleForTesting
    protected static String createLabelText(
            final DistanceUnit scaleUnit, final double value, final DistanceUnit intervalUnit) {
        double scaledValue = scaleUnit.convertTo(value, intervalUnit);

        // assume that there is no interval smaller then 0.0001
        scaledValue = Math.round(scaledValue * 10000) / 10000;
        String decimals = Double.toString(scaledValue).split("\\.")[1];

        if (Double.valueOf(decimals) == 0) {
            return Long.toString(Math.round(scaledValue));
        } else {
            return Double.toString(scaledValue);
        }
    }
1049845
public static LogicalOperator checkOperator(String value) throws IllegalArgumentException {
        boolean containsOr = value.contains(OR);
        boolean containsAnd = value.contains(AND);
        if (containsAnd && containsOr) {
            throw new IllegalArgumentException("Cannot merge AND and OR operators in the same query filter.");
        } else if (containsAnd && !containsOr) {
            return LogicalOperator.AND;
        } else if (containsOr && !containsAnd) {
            return LogicalOperator.OR;
        } else {    // !containsOr && !containsAnd
            return null;
        }
    }
895262
public Expression<Float> eq(float value) {
		String valueString = "'" + value + "'";
		return new Expression<Float>(this, Operation.eq, valueString);
	}
1060767
@Override
    public RoundedMoney with(MonetaryOperator operator) {
        Objects.requireNonNull(operator);
        try {
            return RoundedMoney.from(operator.apply(this));
        } catch (MonetaryException | ArithmeticException e) {
            throw e;
        } catch (Exception e) {
            throw new MonetaryException("Query failed: " + operator, e);
        }
    }
594469
function formatPrecision(value) {
                if (!(value || value === 0)) {
                    return '';
                }
                var formattedValue = parseFloat(value).toFixed(decimals);
                formattedValue = formattedValue.replace('.', decimalSeparator);
                return numberWithCommas(formattedValue);
            }
1174562
private function normalizeValue(string $value, string $operator)
    {
        if (!is_numeric($value)) {
            $this->getLogger()->notice('Invalid filter ignored', [
                'exception' => new InvalidArgumentException(sprintf('Invalid value for "[%s]", expected number', $operator)),
            ]);

            return null;
        }

        return $value + 0; // coerce $value to the right type.
    }
961520
public static final CurrencySymbolPosition parseCurrencySymbolPosition(String value)
   {
      CurrencySymbolPosition result = MAP_TO_CURRENCY_SYMBOL_POSITION.get(value);
      result = result == null ? CurrencySymbolPosition.BEFORE_WITH_SPACE : result;
      return result;
   }
1295573
private void appendNonSeparator() {
    builder.append("[^");
    for (int i = 0; i < separators.length(); i++) {
      appendInBracket(separators.charAt(i));
    }
    builder.append(']');
  }
81247
public CALC setDecimalSeparator(char decimalSeparator) {
        getProperties().setInputDecimalSeparator(decimalSeparator);
        getProperties().setOutputDecimalSeparator(decimalSeparator);
        return getThis();
    }
406521
@Override
  public Decimal convert(Decimal value, String sourceUnit, String destUnit) throws UcumException  {
		assert value != null : paramError("convert", "value", "must not be null");
		assert checkStringParam(sourceUnit) : paramError("convert", "sourceUnit", "must not be null or empty");
		assert checkStringParam(destUnit) : paramError("convert", "destUnit", "must not be null or empty");

		if (sourceUnit.equals(destUnit))
			return value;
			
		Canonical src = new Converter(model, handlers).convert(new ExpressionParser(model).parse(sourceUnit));
		Canonical dst = new Converter(model, handlers).convert(new ExpressionParser(model).parse(destUnit));
		String s = new ExpressionComposer().compose(src, false);
		String d = new ExpressionComposer().compose(dst, false);
		if (!s.equals(d))
			throw new UcumException("Unable to convert between units "+sourceUnit+" and "+destUnit+" as they do not have matching canonical forms ("+s+" and "+d+" respectively)");
		Decimal canValue = value.multiply(src.getValue());
//		System.out.println(value.toPlainString()+sourceUnit+" =("+src.getValue().toPlainString()+")= "+
//				canValue.toPlainString()+s+" =("+dst.getValue().toPlainString()+")= "+
//				canValue.divide(dst.getValue())+destUnit);
		return canValue.divide(dst.getValue());
	}
547558
public static Double stringToScale(String value) {
		NumberFormat numberFormat = NumberFormat.getFormat("###,###");
		String[] scale2 = value.split(":");
		if (scale2.length == 1) {
			return 1.0 / numberFormat.parse(scale2[0].trim());
		} else {
			return numberFormat.parse(scale2[0].trim()) / numberFormat.parse(scale2[1].trim());
		}
	}
842974
public static int parseInt(final String value) {
        if (value != null && value.charAt(0) == '+') {
            return Integer.parseInt(value.substring(1));
        }
        return Integer.parseInt(value);
    }
732273
public Expression<Float> gt(float value) {
		String valueString = "'" + value + "'";
		return new Expression<Float>(this, Operation.gt, valueString);
	}