Object valObj = pair.get(0);
Object scoreObj = pair.get(1);
if (scoreObj == null || !(scoreObj instanceof Number))
throw new ApiException("InvalidScoringPoint", "Invalid score point: \""+pair+"\"; Y coordinate must be a number");
values[i] = valObj;
DbResultAtom atom = new DbResultAtom(values[i]);
char type = atom.type;
if (type == DbServiceUtil.TYPE_CHAR_MAP || type == DbServiceUtil.TYPE_CHAR_LIST)
throw new ApiException("InvalidScoringPoint", "Invalid score point: \""+pair+"\"; X coordinate must be an atomic type");
if (i > 0) {
if (atom.compareTo(values[i-1]) < 0) {
throw new ApiException("InvalidScoringPoint", "X coordinates must be in increasing order, but '"+values[i-1]+"' > '"+values[i]+"'");
}
}
double score = ((Number)scoreObj).doubleValue();
scores[i] = score;