docs: public static HadoopObject primitive2Hadoop(Object object) {
          if (object == null) {
              return new HadoopObject(NULL, NullWritable.get());
          }
  
          if (object instanceof Byte) {
              return new HadoopObject(BYTE, new ByteWritable((Byte) object));
          } else if (object instanceof Integer) {
              return new HadoopObject(INTEGER, new IntWritable((Integer) object));
          } else if (object instanceof Long) {
              return new HadoopObject(LONG, new LongWritable((Long) object));
          } else if (object instanceof Double) {
              return new HadoopObject(DOUBLE, new DoubleWritable((Double) object));
          } else if (object instanceof Float) {
              return new HadoopObject(FLOAT, new FloatWritable((Float) object));
          } else if (object instanceof Boolean) {
              return new HadoopObject(BOOLEAN, new BooleanWritable((Boolean) object));
          } else if (object instanceof String) {
              return new HadoopObject(STRING, new Text((String) object));
          } else if (object.getClass().isArray()) {
              return arrayPrimitive2Hadoop(object);
          } else if (object instanceof Collection<?>) {
              Collection<?> collection = (Collection<?>) object;
              return arrayPrimitive2Hadoop(collection.toArray());
          } else if (object instanceof Map<?, ?>) {
              Map<?, ?> map = (Map<?, ?>) object;
              if (map.size() == 0) {
                  throw new ClassCastException("object not found");
              }
  
              MapWritable mapWritable = new MapWritable();
              for (Entry<?, ?> entry : map.entrySet()) {
                  mapWritable.put(primitive2Hadoop(entry.getKey()).getObject(),
                                  primitive2Hadoop(entry.getValue()).getObject());
              }
  
              return new HadoopObject(MAP, mapWritable);
          }
  
          throw new ClassCastException("cast object not found");
      }