code: public static ValueSetter createValueSetter(Vec v, Object value) {
      if (value == null) {
        return new NAValueSetter();
      }
      switch (v.get_type()) {
        case Vec.T_CAT:
          return new CatValueSetter(v.domain(), value);
        case Vec.T_NUM:
        case Vec.T_TIME:
          return new NumValueSetter(value);
        case Vec.T_STR:
          return new StrValueSetter(value);
        case Vec.T_UUID:
          return new UUIDValueSetter(value);
        default:
          throw new IllegalArgumentException("Cannot create ValueSetter for a Vec of type = " + v.get_type_str());
      }
    }
docs: Create an instance of ValueSetter for a given scalar value.
  It creates setter of the appropriate type based on the type of the underlying Vec.
  @param v Vec
  @param value scalar value
  @return instance of ValueSetter