code: @Override
      public ValueComparator compare(Value o) {
          if (o == null) {
              return ValueComparator.NOT_EQUAL_TO;
          }
          switch (o.getType()) {
              case NOMINALVALUE:
                  NominalValue other = (NominalValue) o;
                  int comp = compareTo(other);
                  return comp > 0 ? ValueComparator.GREATER_THAN
                          : (comp < 0 ? ValueComparator.LESS_THAN
                                  : ValueComparator.EQUAL_TO);
              case VALUELIST:
                  ValueList<?> vl = (ValueList<?>) o;
                  return vl.contains(this) ? ValueComparator.IN : ValueComparator.NOT_IN;
              default:
                  return ValueComparator.NOT_EQUAL_TO;
          }
  
      }
docs: Compares this nominal value and another lexically. If the argument is a
  {@link ListValue}, it checks this string for membership in the list.
  
  @param o another {@link Value}.
  @return If the provided value is a {@link NominalValue}, returns null     {@link ValueComparator#GREATER_THAN},
  {@link ValueComparator#LESS_THAN} or {@link ValueComparator#EQUAL_TO}
  depending on whether this nominal value is lexically greater than, less
  than or equal to the nominal value provided as argument. If the provided
  value is a {@link ValueList}, returns {@link ValueComparator#IN} if this
  object is a member of the list, or {@link ValueComparator#NOT_IN} if not.
  Otherwise, returns {@link ValueComparator#UNKNOWN}.