case SelectorParser.LT:
case SelectorParser.LE:
case SelectorParser.GT:
case SelectorParser.GE:
if (! _left.isUnknown() && ! _left.isNumber())
throw new InvalidSelectorException(L.l("'{0}' must have a numeric value for comparison.",
this));
if (! _right.isUnknown() && ! _right.isNumber())
throw new InvalidSelectorException(L.l("'{0}' must have a numeric value for comparison.",
this));
break;
case SelectorParser.EQ:
case SelectorParser.NE:
if (_left.isUnknown() || _right.isUnknown()) {
}
else if (_left.isNumber() != _right.isNumber()) {
throw new InvalidSelectorException(L.l("'{0}' test must have matching types.",
this));
}
break;
case SelectorParser.AND:
case SelectorParser.OR:
if (! _left.isUnknown() && ! _left.isBoolean())
throw new InvalidSelectorException(L.l("'{0}' must have a numeric value for comparison.",
this));
if (! _right.isUnknown() && ! _right.isBoolean())
throw new InvalidSelectorException(L.l("'{0}' must have a numeric value for comparison.",
this));
break;
}
}