package com.steerinfo.util;

import java.util.Date;
import java.util.List;

public class boolUtil {
	/**
	 * 验证集合是否为空,为空则返回true
	 * 
	 * @param list
	 * @return
	 */
	public static boolean isEmpty(List list) {
		if (list == null)
			return true;

		if (list.size() == 0)
			return true;

		return false;

	}

	/**
	 * 验证字符串是否为空或空字符串,为空则返回true
	 * 
	 * @param object
	 * @return
	 */
	public static boolean isEmpty(String str) {
		if (str == null)
			return true;

		if (str.trim().equals(""))
			return true;

		return false;
	}

	/**
	 * 验证日期是否为空,为空则返回true
	 * 
	 * @param object
	 * @return
	 */
	public static boolean isEmpty(Date str) {
		if (str == null)
			return true;
		return false;
	}

	/**
	 * 验证Double是否为空,为空则返回true
	 * 
	 * @param object
	 * @return
	 */
	public static boolean isEmpty(Double length) {
		if (length == null)
			return true;
		return false;
	}
}
