code: @Override
    public Object put(String key, Object val) {
      val = val != null && val instanceof Number ? Number.class.cast(val).intValue() : val;
      return super.put(key, val);
    }
docs: a ctor that allows passing a map.