public TypeValuePair evaluate(final FormulaContext context,
final ParameterCallback parameters) throws EvaluationException
{
if (parameters.getParameterCount() == 0)
{
return new TypeValuePair(TextType.TYPE, "?");
}
final String text = context.getTypeRegistry().convertToText(parameters.getType(0), parameters.getValue(0));
if (text == null)
{
return new TypeValuePair(TextType.TYPE, "?");
}
if (text.indexOf('?') == -1)
{
return new TypeValuePair(TextType.TYPE, "?");
}
if (text.endsWith("?"))
{
return new TypeValuePair(TextType.TYPE, text);
}
return new TypeValuePair(TextType.TYPE, text + "&");
}