code: public static Double getObjectSize(Object value) {
  
          double v = 1;
  
          if (value instanceof String) {
              v = ((String) value).length();
              if (v < 1) {
                  return null;
              }
          } else if (value instanceof List) {
              v = ((List) value).size();
          } else if (ValidationObjUtil.isNumberObj(value)) {
              v = Double.valueOf(value + "");
          }
  
          return v;
      }
docs: Gets object size.
  
  @param value the value
  @return the object size