判断指定对象是否为空，支持：

<pre>
1. CharSequence
2. Map
3. Iterable
4. Iterator
5. Array
</pre>

@param obj 被判断的对象
@return 是否为空，如果类型不支持，返回false
@since 4.5.7
969632
@SuppressWarnings("rawtypes")
	public static boolean isEmpty(Object obj) {
		if(null == obj) {
			return true;
		}
		
		if(obj instanceof CharSequence) {
			return StrUtil.isEmpty((CharSequence)obj);
		}else if(obj instanceof Map) {
			return MapUtil.isEmpty((Map)obj);
		}else if(obj instanceof Iterable) {
			return IterUtil.isEmpty((Iterable)obj);
		}else if(obj instanceof Iterator) {
			return IterUtil.isEmpty((Iterator)obj);
		}else if(ArrayUtil.isArray(obj)) {
			return ArrayUtil.isEmpty(obj);
		}
		
		return false;
	}
132564
public int length(Object obj) {
        if (isArray(obj)) {
            return ((List) obj).size();
        } else if (isMap(obj)){
            return getPropertyKeys(obj).size();
        } else if(obj instanceof String){
            return ((String)obj).length();
        }
        throw new JsonPathException("length operation cannot be applied to " + obj!=null?obj.getClass().getName():"null");
    }
1076626
public static void validateAttributeValueLength(Object obj) throws IllegalArgumentException {
        if (null != obj) {
            Class cls = obj.getClass();
            Field[] fields = cls.getDeclaredFields();
            for (int i = 0; i < fields.length; i++) {// 遍历
                try {
                    Field field = fields[i];
                    Annotation[] annotations = field.getAnnotations();
                    ValidateLength dataLength = null;
                    for (Annotation annotation : annotations)
                        if (annotation instanceof ValidateLength)
                            dataLength = (ValidateLength) annotation;

                    if (null != dataLength) {
                        field.setAccessible(true); // 打开私有访问
                        String name = field.getName();// 获取属性
                        Object value = field.get(obj);// 获取属性值
                        if (value == null && !dataLength.nullable())
                            throw new IllegalArgumentException(name + " is null");
                        int length = dataLength.value();// 指定的长度
                        int valueLength = 0;// 数据的长度
                        String data;
                        if (value instanceof String) {// 一个个赋值
                            data = (String) value;
                            valueLength = data.length();
                        }

                        if (valueLength > length)
                            throw new IllegalArgumentException(name + " length:" + valueLength + " too long");
                    }
                } catch (IllegalAccessException e) {
                    e.printStackTrace();
                }
            }
        }
    }
463450
public static boolean isNumberic(Object obj) {
        if (obj == null) {
            Log.e("isNumeric", "parameter can't be null.");
            return false;
        }

        try {
            Double.parseDouble(obj.toString());
        } catch (Exception e) {
            return false;
        }

        return true;
    }
6564
public static String toJSONString(final Object obj) {
        try {
            return mapper.writeValueAsString(obj);
        } catch (final JsonProcessingException e) {
            logger.error("Cannot to JSON string", e);
        }
        return null;
    }
610343
private static Object[] convertToObjectArray(Object obj) {
        if (obj instanceof Object[]) {
            return (Object[]) obj;
        }
        int arrayLength = Array.getLength(obj);
        Object[] retArray = new Object[arrayLength];
        for (int i = 0; i < arrayLength; ++i){
            retArray[i] = Array.get(obj, i);
        }
        return retArray;
    }
198343
public static String toJsonStr(Object obj) {
		if (null == obj) {
			return null;
		}
		if (obj instanceof String) {
			return (String) obj;
		}
		return toJsonStr(parse(obj));
	}
906232
public static int length(Object obj) {
		if (obj == null) {
			return 0;
		}
		if (obj instanceof CharSequence) {
			return ((CharSequence) obj).length();
		}
		if (obj instanceof Collection) {
			return ((Collection<?>) obj).size();
		}
		if (obj instanceof Map) {
			return ((Map<?, ?>) obj).size();
		}

		int count;
		if (obj instanceof Iterator) {
			Iterator<?> iter = (Iterator<?>) obj;
			count = 0;
			while (iter.hasNext()) {
				count++;
				iter.next();
			}
			return count;
		}
		if (obj instanceof Enumeration) {
			Enumeration<?> enumeration = (Enumeration<?>) obj;
			count = 0;
			while (enumeration.hasMoreElements()) {
				count++;
				enumeration.nextElement();
			}
			return count;
		}
		if (obj.getClass().isArray() == true) {
			return Array.getLength(obj);
		}
		return -1;
	}
806322
function isEmptyObject(obj) {
  if (isEmpty(obj) === true) {
    return true;
  }
  if (Object.getOwnPropertyNames(obj).length === 0) {
    //if (Object.keys(obj).length === 0 && Object.getOwnPropertyNames(obj).length === 0) {
    return true;
  }
  return false;
}
513489
function (obj) {
            return vQ.isArray(obj) || !vQ.isFunction(obj) &&
                ( obj.length === 0 || typeof obj.length === 'number' && obj.length > 0 && ( obj.length - 1 ) in obj );
        }
722264
function isEmpty(obj) {
  if (Array.isArray(obj)) {
    return obj.length === 0;
  } else if (typeof obj === 'object') {
    for (var i in obj) {
      return false;
    }
    return true;
  } else {
    return !obj;
  }
}
893237
public static Class getTypeClass( Object obj ) {
      if( isNull( obj ) ){
         return Object.class;
      }else if( isArray( obj ) ){
         return List.class;
      }else if( isFunction( obj ) ){
         return JSONFunction.class;
      }else if( isBoolean( obj ) ){
         return Boolean.class;
      }else if( isNumber( obj ) ){
         Number n = (Number) obj;
         if( isInteger( n ) ){
            return Integer.class;
         }else if( isLong( n ) ){
            return Long.class;
         }else if( isFloat( n ) ){
            return Float.class;
         }else if( isBigInteger( n ) ){
            return BigInteger.class;
         }else if( isBigDecimal( n ) ){
            return BigDecimal.class;
         }else if( isDouble( n ) ){
            return Double.class;
         }else{
            throw new JSONException( "Unsupported type" );
         }
      }else if( isString( obj ) ){
         return String.class;
      }else if( isObject( obj ) ){
         return Object.class;
      }else{
         throw new JSONException( "Unsupported type" );
      }
   }
702614
public static boolean isString( Object obj ) {
      if( (obj instanceof String)
            || (obj instanceof Character)
            || (obj != null && (obj.getClass() == Character.TYPE || String.class.isAssignableFrom( obj.getClass() ))) ){
         return true;
      }
      return false;
   }
30077
function ( obj, all ) {
		all = ( all === true );

		var result;

		if ( all ) {
			result = string.explode( obj, " " ).map( function ( i ) {
				return i.charAt( 0 ).toUpperCase() + i.slice( 1 );
			}).join(" ");
		}
		else {
			result = obj.charAt( 0 ).toUpperCase() + obj.slice( 1 );
		}

		return result;
	}
506536
public static JSON parse(Object obj) {
		if (null == obj) {
			return null;
		}

		JSON json = null;
		if (obj instanceof JSON) {
			json = (JSON) obj;
		} else if (obj instanceof String) {
			String jsonStr = ((String) obj).trim();
			if (jsonStr.startsWith("[")) {
				json = parseArray(jsonStr);
			} else {
				json = parseObj(jsonStr);
			}
		} else if (obj instanceof Collection || obj.getClass().isArray()) {// 列表
			json = new JSONArray(obj);
		} else {// 对象
			json = new JSONObject(obj);
		}

		return json;
	}
1212772
public static boolean isFunction( Object obj ) {
      if( obj instanceof String ){
         String str = (String) obj;
         return str.startsWith( FUNCTION_PREFIX ) && RegexpUtils.getMatcher( FUNCTION_PATTERN, true ).matches( str );
      }
      if( obj instanceof JSONFunction ){
         return true;
      }
      return false;
   }
1104824
public static Optional<Object> firstElement(final Object obj) {
        val object = CollectionUtils.toCollection(obj);
        if (object.isEmpty()) {
            return Optional.empty();
        }
        return Optional.of(object.iterator().next());
    }