package com.goafanti.common.utils;

import java.util.regex.Pattern;


public class StringUtils extends org.apache.commons.lang3.StringUtils {
	private static Pattern FRACTIONAL_NUMERIC = Pattern.compile("^[\\-+]?\\d+(\\.\\d+)?$");


	public static boolean isFractionalNumeric(String val) {
		return FRACTIONAL_NUMERIC.matcher(val).matches();
	}

	public static boolean isNull(Object value) {
		return value == null;
	}

	/**
	 * * 判断一个对象是否非空
	 * 
	 * @param object Object
	 * @return true：非空 false：空
	 */
	public static boolean isNotNull(Object object) {
		return !isNull(object);
	}



	/**
	 * * 判断一个对象数组是否为空
	 * 
	 * @param objects 要判断的对象数组
	 ** @return true：为空 false：非空
	 */
	public static boolean isEmpty(Object[] objects) {
		return isNull(objects) || (objects.length == 0);
	}


	
}
