//if the type is ordered then the corresponding TypeValidator should
//know how to compare the values
switch (comparator) {
case CompNode.EQ: return typeValidator.compare(value1, value2) == 0;
case CompNode.NE: return typeValidator.compare(value1, value2) != 0;
case CompNode.GT: return typeValidator.compare(value1, value2) > 0;
case CompNode.GE: return typeValidator.compare(value1, value2) >= 0;
case CompNode.LT: return typeValidator.compare(value1, value2) < 0;
case CompNode.LE: return typeValidator.compare(value1, value2) <= 0;