亚洲免费在线-亚洲免费在线播放-亚洲免费在线观看-亚洲免费在线观看视频-亚洲免费在线看-亚洲免费在线视频

Java工具類

張軍 2287 0
package zj.java.util;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.lang.reflect.Array;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.Set;
import java.util.UUID;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.apache.log4j.Logger;

import com.alibaba.fastjson.JSON;

import zj.check.util.CheckUtil;
import zj.common.exception.ServiceException;
import zj.date.util.DateUtil;
import zj.type.TypeUtil;

/**
 * java工具類
 * 
 * @version 1.00 (2014.09.15)
 * @author SHNKCS 張軍 {@link <a target=_blank href="http://www.shanghaijiadun.com">上海加盾信息科技有限公司</a>&nbsp;&nbsp;&nbsp;&nbsp;<a target=_blank href="http://m.eyofj.com">張軍個(gè)人網(wǎng)站</a>&nbsp;&nbsp;&nbsp;&nbsp;<a target=_blank href="http://user.qzone.qq.com/360901061/">張軍QQ空間</a>}
 */
public class JavaUtil implements Serializable {
	private static final long serialVersionUID = 1L;
	private transient static final Logger log = Logger.getLogger(JavaUtil.class);
	/**
	 * 單位進(jìn)位,中文默認(rèn)為4位即(萬、億)
	 */
	public static int UNIT_STEP = 4;

	/**
	 * 單位
	 */
	public static String[] CN_UNITS = new String[] { "個(gè)", "十", "百", "千", "萬", "十", "百", "千", "億", "十", "百", "千", "萬" };
	/**
	 * 漢字
	 */
	public static String[] CN_CHARS = new String[] { "零", "一", "二", "三", "四", "五", "六", "七", "八", "九" };

	/**
	 * 打印json
	 * 
	 * @param json
	 */
	@SuppressWarnings("unchecked")
	public static Map<String, Object> parseMap(String json) {
		return parseJson(json, Map.class);
	}

	/**
	 * 打印json
	 * 
	 * @param json
	 */
	public static <T> T parseJson(String json, Class<T> clz) {
		T result = JSON.parseObject(json, clz);
		log.debug("json返回結(jié)果------------>");
		log.debug(JSON.toJSONString(result, true));
		return result;
	}

	/**
	 * 獲取系統(tǒng)換行符號(hào)
	 * 
	 * @return
	 */
	public static String getLineBreak() {
		if (JavaUtil.isWindows()) {
			return "\r\n";
		} else if (JavaUtil.isMac()) {
			return "\r";
		} else {
			return "\n";
		}
	}

	/**
	 * 分割email地址,轉(zhuǎn)換成一行
	 * 
	 * @param p_emails
	 *            email地址
	 */
	public static String emailSplitToOneline(String p_emails) {
		return emailSplitToOneline(p_emails, ";");
	}

	/**
	 * 分割email地址,轉(zhuǎn)換成一行
	 * 
	 * @param p_emails
	 *            email地址
	 */
	public static String emailSplitToOneline(String p_emails, String split) {
		// String s = "a; bbcdd55 \r\nb\r\nc\r\nd";
		String[] v_emails1 = JavaUtil.split(p_emails, getLineBreak());
		String r_emails = "";
		for (String v_email1 : v_emails1) {
			v_email1 = JavaUtil.trim(v_email1);
			if (CheckUtil.isNull(v_email1)) {
				continue;
			}
			String[] v_emails2 = JavaUtil.split(v_email1, split);
			for (String v_email2 : v_emails2) {
				v_email2 = JavaUtil.trim(v_email2);
				if (CheckUtil.isNull(v_email1)) {
					continue;
				}
				if (CheckUtil.isNotNull(r_emails)) {
					r_emails += split;
				}
				r_emails += v_email2;
			}
		}
		return r_emails;
	}

	/**
	 * 是否是windows
	 * 
	 * @return
	 */
	public static boolean isWindows() {
		try {
			String osName = System.getProperty("os.name");
			return JavaUtil.toLowerCase(osName).indexOf("windows") != -1;
		} catch (Exception e) {
			return true;
		}
	}

	/**
	 * 是否是mac系統(tǒng)
	 * 
	 * @return
	 */
	public static boolean isMac() {
		try {
			String osName = System.getProperty("os.name");
			return JavaUtil.toLowerCase(osName).indexOf("mac") != -1;
		} catch (Exception e) {
			return true;
		}
	}

	/**
	 * 支持到12位
	 *
	 * @param numberStr
	 *            中文數(shù)字
	 * @return int 數(shù)字
	 */
	public static int getIntegerByStr(String numberStr) {

		// 返回結(jié)果
		int sum = 0;

		// null或空串直接返回
		if (numberStr == null || ("").equals(numberStr)) {
			return sum;
		}

		// 過億的數(shù)字處理
		if (numberStr.indexOf("億") > 0) {
			String currentNumberStr = numberStr.substring(0, numberStr.indexOf("億"));
			int currentNumber = doByStr(currentNumberStr);
			sum += currentNumber * Math.pow(10, 8);
			numberStr = numberStr.substring(numberStr.indexOf("億") + 1);
		}

		// 過萬的數(shù)字處理
		if (numberStr.indexOf("萬") > 0) {
			String currentNumberStr = numberStr.substring(0, numberStr.indexOf("萬"));
			int currentNumber = doByStr(currentNumberStr);
			sum += currentNumber * Math.pow(10, 4);
			numberStr = numberStr.substring(numberStr.indexOf("萬") + 1);
		}

		// 小于萬的數(shù)字處理
		if (!("").equals(numberStr)) {
			int currentNumber = doByStr(numberStr);
			sum += currentNumber;
		}

		return sum;
	}

	/**
	 * 把億、萬分開每4位一個(gè)單元,解析并獲取到數(shù)據(jù)
	 * 
	 * @param testNumber
	 * @return
	 */
	public static int doByStr(String testNumber) {
		// 返回結(jié)果
		int sum = 0;

		// null或空串直接返回
		if (testNumber == null || ("").equals(testNumber)) {
			return sum;
		}

		// 獲取到千位數(shù)
		if (testNumber.indexOf("千") > 0) {
			String currentNumberStr = testNumber.substring(0, testNumber.indexOf("千"));
			sum += doByStrReplace(currentNumberStr) * Math.pow(10, 3);
			testNumber = testNumber.substring(testNumber.indexOf("千") + 1);
		}

		// 獲取到百位數(shù)
		if (testNumber.indexOf("百") > 0) {
			String currentNumberStr = testNumber.substring(0, testNumber.indexOf("百"));
			sum += doByStrReplace(currentNumberStr) * Math.pow(10, 2);
			testNumber = testNumber.substring(testNumber.indexOf("百") + 1);
		}

		// 對(duì)于特殊情況處理 比如10-19是個(gè)數(shù)字,十五轉(zhuǎn)化為一十五,然后再進(jìn)行處理
		if (testNumber.indexOf("十") == 0) {
			testNumber = "一" + testNumber;
		}

		// 獲取到十位數(shù)
		if (testNumber.indexOf("十") > 0) {
			String currentNumberStr = testNumber.substring(0, testNumber.indexOf("十"));
			sum += doByStrReplace(currentNumberStr) * Math.pow(10, 1);
			testNumber = testNumber.substring(testNumber.indexOf("十") + 1);
		}

		// 獲取到個(gè)位數(shù)
		if (!("").equals(testNumber)) {
			sum += doByStrReplace(testNumber.replaceAll("零", ""));
		}

		return sum;
	}

	public static int doByStrReplace(String replaceNumber) {
		switch (replaceNumber) {
		case "一":
			return 1;
		case "二":
			return 2;
		case "三":
			return 3;
		case "四":
			return 4;
		case "五":
			return 5;
		case "六":
			return 6;
		case "七":
			return 7;
		case "八":
			return 8;
		case "九":
			return 9;
		case "零":
			return 0;
		default:
			throw new ServiceException("無法解析大寫數(shù)字【" + replaceNumber + "】");
		}
	}

	/**
	 * 數(shù)字轉(zhuǎn)大寫,僅僅轉(zhuǎn)大寫
	 * 
	 * @param pnum
	 *            數(shù)字字符串,可帶其它字符
	 * @author 張軍
	 * @date 2015-11-03 21:59:00
	 * @modifiyNote
	 * @version 1.0
	 * @return
	 */
	public static String numToCnChar(String pnum) {
		char[] cnumAry = pnum.toCharArray();
		String snumNew = "";
		for (char cnum : cnumAry) {
			String snum = objToStr(cnum);
			if (CheckUtil.isPlusNum(snum)) {
				snumNew += CN_CHARS[TypeUtil.Primitive.intValue(snum)];
			} else {
				snumNew += snum;
			}
		}
		return snumNew;
	}

	/**
	 * 數(shù)字轉(zhuǎn)大寫日期(只支持4位數(shù)字年或2位數(shù)字月日)
	 * 
	 * @see 年、月、日分別調(diào)用
	 * @param pnum
	 *            數(shù)字
	 * @param decimal
	 *            是否是十進(jìn)位,默認(rèn)false,如果是true,則12-》十二
	 * @author 張軍
	 * @date 2015-11-03 21:59:00
	 * @modifiyNote
	 * @version 1.0
	 * @return
	 */
	public static String numToCnCharDate(int pnum) {
		String rnum = numToCnChar(JavaUtil.objToStr(pnum));
		if (pnum < 1000) {
			if (pnum == 10) {
				rnum = "十";
			} else if (pnum > 10) {
				if (rnum.startsWith("一")) {
					rnum = "十" + rnum.substring(1);
				} else {
					rnum = rnum.substring(0, 1) + "十" + rnum.substring(1);
				}
			}
		}
		return rnum;
	}

	/**
	 * 數(shù)值轉(zhuǎn)換為中文字符串 如2轉(zhuǎn)化為貳
	 */
	public static String numToCn(long num) {
		return numToCn(num, true);
	}

	/**
	 * 數(shù)值轉(zhuǎn)換為中文字符串(口語化)
	 * 
	 * @param num
	 *            需要轉(zhuǎn)換的數(shù)值
	 * @param isColloquial
	 *            是否口語化。例如12轉(zhuǎn)換為'十二'而不是'一十二'。
	 * @return
	 */
	public static String numToCn(String num, boolean isColloquial) {
		int integer = 0, decimal = 0;
		StringBuffer strs = new StringBuffer(32);
		String[] splitNum = num.split("\\.");
		if (splitNum.length > 0)
			integer = Integer.parseInt(splitNum[0]); // 整數(shù)部分
		if (splitNum.length > 1)
			decimal = Integer.parseInt(splitNum[1]); // 小數(shù)部分
		String[] result_1 = numConvert(integer, isColloquial);
		for (String str1 : result_1)
			strs.append(str1);
		if (decimal == 0) {// 小數(shù)部分為0時(shí)
			return strs.toString();
		} else {
			String result_2 = numToCnChar("" + decimal); // 例如5.32,小數(shù)部分展示三二,而不是三十二
			strs.append("點(diǎn)");
			strs.append(result_2);
			return strs.toString();
		}
	}

	/**
	 * 對(duì)于int,long類型的數(shù)據(jù)處理
	 * 
	 * @param num
	 *            需要轉(zhuǎn)換的數(shù)值
	 * @param isColloquial
	 *            是否口語化。例如12轉(zhuǎn)換為'十二'而不是'一十二'。
	 * @return
	 */
	public static String numToCn(long num, boolean isColloquial) {
		String[] result = numConvert(num, isColloquial);
		StringBuffer strs = new StringBuffer(32);
		for (String str : result) {
			strs.append(str);
		}
		return strs.toString();
	}

	/**
	 * 將數(shù)值轉(zhuǎn)換為中文
	 * 
	 * @param num
	 *            需要轉(zhuǎn)換的數(shù)值
	 * @param isColloquial
	 *            是否口語化。例如12轉(zhuǎn)換為'十二'而不是'一十二'。
	 * @return
	 */
	public static String[] numConvert(long num, boolean isColloquial) {
		if (num < 10) {// 10以下直接返回對(duì)應(yīng)漢字
			return new String[] { CN_CHARS[(int) num] };// ASCII2int
		}

		char[] chars = String.valueOf(num).toCharArray();
		if (chars.length > CN_UNITS.length) {// 超過單位表示范圍的返回空
			return new String[] {};
		}

		boolean isLastUnitStep = false;// 記錄上次單位進(jìn)位
		ArrayList<String> cnchars = new ArrayList<String>(chars.length * 2);// 創(chuàng)建數(shù)組,將數(shù)字填入單位對(duì)應(yīng)的位置
		for (int pos = chars.length - 1; pos >= 0; pos--) {// 從低位向高位循環(huán)
			char ch = chars[pos];
			String cnChar = CN_CHARS[ch - '0'];// ascii2int 漢字
			int unitPos = chars.length - pos - 1;// 對(duì)應(yīng)的單位坐標(biāo)
			String cnUnit = CN_UNITS[unitPos];// 單位
			boolean isZero = (ch == '0');// 是否為0
			boolean isZeroLow = (pos + 1 < chars.length && chars[pos + 1] == '0');// 是否低位為0

			boolean isUnitStep = (unitPos >= UNIT_STEP && (unitPos % UNIT_STEP == 0));// 當(dāng)前位是否需要單位進(jìn)位

			if (isUnitStep && isLastUnitStep) {// 去除相鄰的上一個(gè)單位進(jìn)位
				int size = cnchars.size();
				cnchars.remove(size - 1);
				if (!CN_CHARS[0].equals(cnchars.get(size - 2))) {// 補(bǔ)0
					cnchars.add(CN_CHARS[0]);
				}
			}

			if (isUnitStep || !isZero) {// 單位進(jìn)位(萬、億),或者非0時(shí)加上單位
				cnchars.add(cnUnit);
				isLastUnitStep = isUnitStep;
			}
			if (isZero && (isZeroLow || isUnitStep)) {// 當(dāng)前位為0低位為0,或者當(dāng)前位為0并且為單位進(jìn)位時(shí)進(jìn)行省略
				continue;
			}
			cnchars.add(cnChar);
			isLastUnitStep = false;
		}

		Collections.reverse(cnchars);
		// 清除最后一位的0
		int chSize = cnchars.size();
		String chEnd = cnchars.get(chSize - 1);
		if (CN_CHARS[0].equals(chEnd) || CN_UNITS[0].equals(chEnd)) {
			cnchars.remove(chSize - 1);
		}

		// 口語化處理
		if (isColloquial) {
			String chFirst = cnchars.get(0);
			String chSecond = cnchars.get(1);
			if (chFirst.equals(CN_CHARS[1]) && chSecond.startsWith(CN_UNITS[1])) {// 是否以'一'開頭,緊跟'十'
				cnchars.remove(0);
			}
		}
		return cnchars.toArray(new String[] {});
	}

	/**
	 * 檢查數(shù)據(jù)差異
	 * 
	 * @param text
	 *            數(shù)字
	 * @author 張軍
	 * @date 2015-11-03 21:59:00
	 * @modifiyNote
	 * @version 1.0
	 * @return
	 */
	public static <T> List<T> diffColl(Collection<T> c1, Collection<T> c2) {
		List<T> result = new ArrayList<T>();
		try {
			// 添加至去重列表中
			Set<T> allC = new HashSet<T>();
			allC.addAll(c1);
			allC.addAll(c2);
			for (T v : allC) {
				if (c1.contains(v) && c2.contains(v)) {
					// 兩個(gè)集合中的數(shù)據(jù)共同包含
				} else {
					// 兩個(gè)集合中的數(shù)據(jù)不相同的
					result.add(v);
				}
			}
		} catch (Exception e) {
			throw new ServiceException(e);
		}
		return result;
	}

	/**
	 * DecimalFormat轉(zhuǎn)換數(shù)字
	 * 
	 * @param text
	 *            數(shù)字
	 * @author 張軍
	 * @date 2015-11-03 21:59:00
	 * @modifiyNote
	 * @version 1.0
	 * @return
	 */
	public static String covertNumEToString(Object text) {
		return covertNumEToString(text, null);
	}

	/**
	 * DecimalFormat轉(zhuǎn)換數(shù)字
	 * 
	 * @param text
	 *            數(shù)字
	 * @param format
	 *            格式
	 * @author 張軍
	 * @date 2015-11-03 21:59:00
	 * @modifiyNote
	 * @version 1.0
	 * @return
	 */
	public static String covertNumEToString(Object text, String format) {
		try {
			if (CheckUtil.isNull(format)) {
				format = "#.##";
			}
			if (!(text instanceof String)) {
				DecimalFormat df = new DecimalFormat(format);
				Double d = Double.parseDouble(df.format(text));
				String sd = df.format(d);
				return sd;
			}
			return objToStr(text);
		} catch (Exception e) {
			throw new ServiceException(e);
		}
	}

	/**
	 * DecimalFormat轉(zhuǎn)換數(shù)字
	 * 
	 * @param text
	 *            數(shù)字
	 * @author 張軍
	 * @date 2015-11-03 21:59:00
	 * @modifiyNote
	 * @version 1.0
	 * @return
	 */
	public static String covertToNumSplit(Object text) {
		return covertToNumSplit(text, null);
	}

	/**
	 * DecimalFormat轉(zhuǎn)換數(shù)字
	 * 
	 * @param text
	 *            數(shù)字
	 * @param format
	 *            格式
	 * @author 張軍
	 * @date 2015-11-03 21:59:00
	 * @modifiyNote
	 * @version 1.0
	 * @return
	 */
	public static String covertToNumSplit(Object text, String format) {
		try {
			if (CheckUtil.isNull(format)) {
				format = "###,###.##";
			}
			DecimalFormat df = new DecimalFormat(format);
			return df.format(TypeUtil.Primitive.doubleValueNoCatchError(text));
		} catch (Exception e) {
			throw new ServiceException(e);
		}
	}

	/**
	 * 轉(zhuǎn)換數(shù)字
	 * 
	 * @param text
	 *            數(shù)字
	 * @author 張軍
	 * @date 2015-11-03 21:59:00
	 * @modifiyNote
	 * @version 1.0
	 * @return
	 */
	public static BigDecimal covertBigDecimal(Object text) {
		String value = JavaUtil.conversionStringToNumber(JavaUtil.trim(JavaUtil.objToStr(text)));
		BigDecimal bvalue = BigDecimal.ZERO;
		if (CheckUtil.isNotNull(value)) {
			try {
				bvalue = new BigDecimal(value);
			} catch (Exception e) {
				// 不做處理
			}
		}
		return bvalue;
	}

	/**
	 * 獲取in的字符串
	 * 
	 * @param strs
	 *            字符集合
	 * @author 張軍
	 * @date 2015-11-03 21:59:00
	 * @modifiyNote
	 * @version 1.0
	 * @return
	 */
	public static String sqlInStr(Collection<String> strs) {
		String rtnStrs = "";
		int i = 0;
		for (String s : strs) {
			if (i != 0)
				rtnStrs += ",";
			rtnStrs += "'" + s + "'";
			i++;
		}
		return rtnStrs;
	}

	/**
	 * 轉(zhuǎn)換文件大小為B、KB、MB、GB
	 * 
	 * @param size
	 *            文件大小
	 * @author 張軍
	 * @date 2015-11-03 21:59:00
	 * @modifiyNote
	 * @version 1.0
	 * @return
	 */
	public static String convertFileSize(long size) {
		// 轉(zhuǎn)成大數(shù)據(jù)
		if (size < 1024) {
			// B
			return String.valueOf(size) + "B";
		} else {
			// KB
			BigDecimal b1024 = new BigDecimal(1024);
			BigDecimal tempSize = new BigDecimal(size);
			BigDecimal valueSize = tempSize.divide(b1024, 8, BigDecimal.ROUND_HALF_UP);
			if (valueSize.compareTo(b1024) <= 0) {
				// 如果小于1024
				return valueSize.setScale(2, BigDecimal.ROUND_HALF_UP).toString() + "KB";
			} else {
				// MB
				valueSize = valueSize.divide(b1024, 6, BigDecimal.ROUND_HALF_UP);
				if (valueSize.compareTo(b1024) <= 0) {
					// 如果小于1024
					return valueSize.setScale(2, BigDecimal.ROUND_HALF_UP).toString() + "MB";
				} else {
					// GB
					valueSize = valueSize.divide(b1024, 4, BigDecimal.ROUND_HALF_UP);
					if (valueSize.compareTo(b1024) <= 0) {
						// 如果小于1024
						return valueSize.setScale(2, BigDecimal.ROUND_HALF_UP).toString() + "GB";
					} else {
						// TB
						valueSize = valueSize.divide(b1024, 2, BigDecimal.ROUND_HALF_UP);
						if (valueSize.compareTo(b1024) <= 0) {
							// 如果小于1024
							return valueSize.setScale(2, BigDecimal.ROUND_HALF_UP).toString() + "TB";
						} else {
							// 默認(rèn)
							return tempSize.toString() + "B";
						}
					}
				}
			}
		}
	}

	/**
	 * 深度拷貝list數(shù)據(jù)
	 * 
	 * @param src
	 *            源集合
	 * @author 張軍
	 * @date 2015-11-03 21:59:00
	 * @modifiyNote
	 * @version 1.0
	 * @return
	 */
	@SuppressWarnings("unchecked")
	public static <T> List<T> deepCopy(List<T> src) {
		try {
			ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
			ObjectOutputStream out = new ObjectOutputStream(byteOut);
			out.writeObject(src);
			ByteArrayInputStream byteIn = new ByteArrayInputStream(byteOut.toByteArray());
			ObjectInputStream in = new ObjectInputStream(byteIn);
			return (List<T>) in.readObject();
		} catch (Exception e) {
			return null;
		}
	}

	/**
	 * 合并兩個(gè)數(shù)組
	 * 
	 * @param first
	 *            第一個(gè)數(shù)組
	 * @param second
	 *            第二個(gè)數(shù)組
	 * @author 張軍
	 * @date 2015-11-03 21:59:00
	 * @modifiyNote
	 * @version 1.0
	 * @return
	 */
	public static <T> T[] concatArray(T[] first, T[] second) {
		T[] result = Arrays.copyOf(first, first.length + second.length);
		System.arraycopy(second, 0, result, first.length, second.length);
		return result;
	}

	// @SuppressWarnings("unchecked")
	// public static <T> T[] concatArray(T[] a, T[] b) {
	// final int alen = a.length;
	// final int blen = b.length;
	// if (alen == 0) {
	// return b;
	// }
	// if (blen == 0) {
	// return a;
	// }
	// final T[] result = (T[]) java.lang.reflect.Array.newInstance(a.getClass().getComponentType(), alen + blen);
	// System.arraycopy(a, 0, result, 0, alen);
	// System.arraycopy(b, 0, result, alen, blen);
	// return result;
	// }
	/**
	 * 合并多個(gè)數(shù)組
	 * 
	 * @param first
	 *            第一個(gè)數(shù)組
	 * @param rest
	 *            多個(gè)組合
	 * @author 張軍
	 * @date 2015-11-03 21:59:00
	 * @modifiyNote
	 * @version 1.0
	 * @return
	 */
	@SuppressWarnings("unchecked")
	public static <T> T[] concatArrayAll(T[] first, T[]... rest) {
		int totalLength = first.length;
		for (T[] array : rest) {
			totalLength += array.length;
		}
		T[] result = Arrays.copyOf(first, totalLength);
		int offset = first.length;
		for (T[] array : rest) {
			System.arraycopy(array, 0, result, offset, array.length);
			offset += array.length;
		}
		return result;
	}

	/**
	 * 替換字符串
	 * 
	 * @param template
	 *            模板字符串
	 * @param placeholder
	 * @param replacement
	 * @return
	 */
	public static String replaceOnce(String template, String placeholder, String replacement) {
		// System.out.println("varchar($2)".replaceAll("\\$2", "9")+replaceOnce("varchar($2)","$2","6"));
		int loc = template == null ? -1 : template.indexOf(placeholder);
		if (loc < 0) {
			return template;
		} else {
			return new StringBuffer(template.substring(0, loc)).append(replacement).append(template.substring(loc + placeholder.length())).toString();
		}
	}

	/**
	 * 去除text所有空格
	 * 
	 * @param text
	 * @return
	 */
	public static final String trims(String text) {
		if (CheckUtil.isNull(text)) {
			return text;
		}
		String newStr = "";
		char[] chars = text.toCharArray();
		for (char c : chars) {
			String s = JavaUtil.objToStr(c);
			if (CheckUtil.isNull(s)) {
				continue;
			}
			newStr += s;
		}
		return newStr;
	}

	/**
	 * 去除text左右空格
	 * 
	 * @param text
	 * @return
	 */
	public static final String trim(String text) {
		return ltrim(rtrim(text));
	}

	/**
	 * 替換左字符 String d = "b d a e abcd f "; String rs = CommonUtil.ltrimText(d, "a", "b", " d");
	 * 
	 * @param text
	 * @param trimText
	 * @return
	 */
	public static final String ltrimText(final String text, String... trimText) {
		if (text == null) {
			return null;
		}
		if (trimText == null || trimText.length == 0) {
			return ltrim(text);
		}
		int pos = 0;
		for (; pos < text.length(); pos++) {
			boolean notTrimChar = true;
			for (int i = 0; i < trimText.length; i++) {
				notTrimChar &= (trimText[i].indexOf(text.charAt(pos)) < 0);
			}
			if (notTrimChar) {
				break;
			}
		}
		return text.substring(pos);
	}

	/**
	 * 替換右字符
	 * 
	 * @param text
	 * @param trimText
	 * @return
	 */
	public static final String rtrimText(final String text, String... trimText) {
		if (text == null) {
			return null;
		}
		if (trimText == null || trimText.length == 0) {
			return rtrim(text);
		}
		int pos = text.length() - 1;
		for (; pos >= 0; pos--) {
			boolean notTrimChar = true;
			for (int i = 0; i < trimText.length; i++) {
				notTrimChar &= (trimText[i].indexOf(text.charAt(pos)) < 0);
			}
			if (notTrimChar) {
				break;
			}
		}
		return text.substring(0, pos + 1);
	}

	/**
	 * 替換左字符串
	 * 
	 * @param text
	 * @return
	 */
	public static final String ltrim(String text) {
		return ltrim(text, null);
	}

	/**
	 * 替換左字符串
	 * 
	 * @param text
	 * @param trimText
	 * @return
	 */
	public static final String ltrim(String text, String trimText) {
		if (text == null)
			return null;
		if (trimText == null)
			trimText = " ";
		int pos;
		for (pos = 0; pos < text.length() && trimText.indexOf(text.charAt(pos)) >= 0; pos++)
			;
		return text.substring(pos);
	}

	/**
	 * 替換右字符串
	 * 
	 * @param text
	 * @return
	 */
	public static final String rtrim(String text) {
		return rtrim(text, null);
	}

	/**
	 * 替換右字符串
	 * 
	 * @param text
	 * @param trimText
	 * @return
	 */
	public static final String rtrim(String text, String trimText) {
		if (text == null)
			return null;
		if (trimText == null)
			trimText = " ";
		int pos;
		for (pos = text.length() - 1; pos >= 0 && trimText.indexOf(text.charAt(pos)) >= 0; pos--)
			;
		return text.substring(0, pos + 1);
	}

	/**
	 * 分割字符串類
	 * 
	 * @author zhangjun
	 * 
	 */
	public static class SplitConstants {
		public static final String TRIM = "all";
		public static final String NRIM = "none";
		public static final String LTRIM = "left";
		public static final String RTRIM = "right";

		public static final String NO_CASE = "";
		public static final String TO_UPPER_CASE = "0";
		public static final String TO_LOWER_CASE = "1";
	}

	/**
	 * 分割字符串
	 * 
	 * @param str
	 * @param delim
	 * @return
	 */
	public static final String[] split(String str, String delim) {
		return split(str, delim, SplitConstants.TRIM, SplitConstants.NO_CASE);
	}

	/**
	 * 分割字符串
	 * 
	 * @param str
	 * @param delim
	 * @param caseType
	 * @return
	 */
	public static final String[] split(String str, String delim, String caseType) {
		return split(str, delim, SplitConstants.TRIM, caseType);
	}

	/**
	 * 分割字符串
	 * 
	 * @param str
	 * @param delim
	 * @param trim
	 *            去除左右空格
	 * @param caseType
	 * @return
	 */
	public static final String[] split(String str, String delim, String trim, String caseType) {
		String[] arrayStrings;
		try {
			arrayStrings = mySplit(str, delim, trim, caseType);
		} catch (Throwable t) {
			arrayStrings = null;
		}
		if (arrayStrings == null) {
			arrayStrings = new String[0];
		}
		return arrayStrings;

	}

	/**
	 * 分割字符串
	 * 
	 * @param s
	 * @param delimiter
	 * @param trim
	 * @param caseType
	 * @return
	 */
	private static String[] mySplit(String str, String delimiter, String trim, String caseType) {
		int delimiterLength;
		int stringLength = str.length();
		if (delimiter == null || (delimiterLength = delimiter.length()) == 0) {
			return new String[] { str };
		}
		int count;
		int start;
		int end;
		count = 0;
		start = 0;
		while ((end = str.indexOf(delimiter, start)) != -1) {
			count++;
			start = end + delimiterLength;
		}
		count++;
		String[] result = new String[count];
		count = 0;
		start = 0;
		while ((end = str.indexOf(delimiter, start)) != -1) {
			result[count] = getTrimStr(str.substring(start, end), trim, caseType);
			count++;
			start = end + delimiterLength;
		}
		end = stringLength;
		result[count] = getTrimStr(str.substring(start, end), trim, caseType);
		return (result);
	}

	/**
	 * 合并字符串
	 * 
	 * @param str
	 * @param trim
	 * @param caseType
	 * @return
	 */
	private static String getTrimStr(String str, String trim, String caseType) {
		if (SplitConstants.TRIM.equals(trim)) {
			str = str.trim();
		} else if (SplitConstants.LTRIM.equals(trim)) {
			str = ltrim(str);
		} else if (SplitConstants.RTRIM.equals(trim)) {
			str = rtrim(str);
		}
		if (SplitConstants.TO_LOWER_CASE.equals(caseType)) {
			str = str.toLowerCase();
		} else if (SplitConstants.TO_UPPER_CASE.equals(caseType)) {
			str = str.toUpperCase();
		}
		return str;
	}

	/**
	 * 轉(zhuǎn)strs數(shù)組為字符串用split分割
	 * 
	 * @param strs
	 * @param split
	 * @return
	 */
	public static String getAryStrs(String[] strs, String split) {
		return getAryStrs(strs, split, "");
	}

	/**
	 * 轉(zhuǎn)split分割的str字符串,轉(zhuǎn)新的分割newSplit,添加在值左右添加addStr字符串
	 * 
	 * @param str
	 * @param split
	 * @param newSplit
	 * @param addStr
	 * @return
	 */
	public static String getAryStrs(String str, String split, String newSplit, String addStr) {
		return getAryStrs(split(str, split), newSplit, addStr);
	}

	/**
	 * 轉(zhuǎn)strs數(shù)組為字符串用split分割,添加在值左右添加addStr字符串
	 * 
	 * @param strs
	 * @param split
	 * @param addStr
	 * @return
	 */
	public static String getAryStrs(String[] strs, String split, String addStr) {
		String rtnStrs = "";
		try {
			if (strs.length == 1 && strs[0].equals(""))
				return "";
			for (int i = 0; i < strs.length; i++) {
				if (i != 0)
					rtnStrs += split;
				rtnStrs += addStr + strs[i] + addStr;
			}
		} catch (Exception e) {
			rtnStrs = "";
			log.error(e.getMessage());
		}
		return rtnStrs;
	}

	/**
	 * 返回String
	 * 
	 * @param o
	 * @return
	 */
	public static String objToStr(Object obj) {
		String str = "";
		if (obj == null) {
			return str;
		} else {
			if (obj instanceof Date) {
				str = DateUtil.dateParse((Date) obj, "yyyy-MM-dd HH:mm:ss");
			} else {
				str = obj.toString();
			}
		}
		return str;
	}

	/**
	 * 返回String
	 * 
	 * @param o
	 * @return
	 */
	public static String objToStrNull(Object obj) {
		if (obj == null) {
			return null;
		} else {
			return objToStr(obj);
		}
	}

	/**
	 * 轉(zhuǎn)換成大寫
	 * 
	 * @param o
	 * @return
	 */
	public static String toUpperCase(String o) {
		return o == null ? null : o.toUpperCase();
	}

	/**
	 * 轉(zhuǎn)換成小寫
	 * 
	 * @param o
	 * @return
	 */
	public static String toLowerCase(String o) {
		return o == null ? null : o.toLowerCase();
	}

	/**
	 * LIST轉(zhuǎn)數(shù)組
	 * 
	 * @param list
	 * @param clazz
	 * @return
	 */
	public static <T> T[] listToArray(List<T> list, Class<T> clazz) {
		if (list == null || list.size() == 0)
			return null;
		@SuppressWarnings("unchecked")
		T[] array = (T[]) Array.newInstance(clazz, list.size());
		for (int i = 0; i < array.length; i++) {
			array[i] = list.get(i);
		}
		return array;
	}

	/**
	 * 獲取最大長度文字
	 * 
	 * @param text
	 * @param count
	 * @return
	 */
	public static String getMaxText(String text, int count) {
		// 設(shè)置文章標(biāo)題最大值
		if (text == null || text.trim().equals(""))
			return "";
		int maxIndex = -1;
		maxIndex = text.length();
		if (maxIndex > count) {
			return text.substring(0, count) + "...";
		} else {
			return text;
		}
	}

	/**
	 * 轉(zhuǎn)換重復(fù)的list集合
	 * 
	 * @param list
	 * @return
	 */
	public static List<Map<Object, List<Object>>> convertRepeatList(List<Map<Object, Object>> list) {
		List<Map<Object, List<Object>>> rtnList = new ArrayList<Map<Object, List<Object>>>();
		Map<Object, Object> newMap = new HashMap<Object, Object>();
		for (Map<Object, Object> map : list) {
			Object key = map.keySet().iterator().next();
			newMap.put(key, null);
		}
		Map<Object, List<Object>> newMaps = null;
		List<Object> newLists = null;
		for (Object key : newMap.keySet()) {
			newMaps = new HashMap<Object, List<Object>>();
			newLists = new ArrayList<Object>();
			for (Map<Object, Object> map : list) {
				Object value2 = map.get(key);
				if (map.containsKey(key)) {
					newLists.add(value2);
				}
			}
			newMaps.put(key, newLists);
			rtnList.add(newMaps);
		}
		return rtnList;
	}

	/**
	 * 獲取UUID唯一標(biāo)識(shí)
	 * 
	 * @return
	 */
	public static synchronized String getUUID() {
		// + "-" + System.currentTimeMillis()
		return getUUID("");
	}

	/**
	 * 
	 * @return
	 */
	public static synchronized String getUUID32() {
		// + "-" + System.currentTimeMillis()
		return UUID.randomUUID().toString().replaceAll("-", "");
	}

	/**
	 * 獲取UUID唯一標(biāo)識(shí)
	 * 
	 * @return
	 */
	public static synchronized String getUUID(Class<?> cla) {
		return getUUID(cla.getSimpleName());
	}

	/**
	 * 獲取UUID唯一標(biāo)識(shí)
	 * 
	 * @return
	 */
	public static synchronized String getUUID(String prefix) {
		String ymdhmss = DateUtil.dateParse(new Date(), "yyyyMMddHHmmssSSS");
		return (CheckUtil.isNull(prefix) ? "id_" + ymdhmss : toLowerCase(prefix) + "_" + ymdhmss) + "_" + getUUID32();
	}

	/**
	 * Object對(duì)象換int類型
	 * 
	 * @param o
	 * @return
	 */
	public static int getIntValue(Object o) {
		if (o == null) {
			return 0;
		} else {
			try {
				if (o instanceof BigDecimal) {
					return ((BigDecimal) o).intValue();
				} else if (o instanceof Integer) {
					return ((Integer) o).intValue();
				} else if (o instanceof Long) {
					return ((Long) o).intValue();
				} else if (o instanceof String) {
					return Integer.parseInt(String.valueOf(o));
				} else {
					return Integer.parseInt(o + "");
				}
			} catch (Exception e) {
				log.error(e.getMessage());
				return 0;
			}
		}
	}

	/**
	 * 去除數(shù)組中為null或""的值
	 * 
	 * @param values
	 * @return
	 */
	public static String[] aryTrimValue(String[] values) {
		if (values == null) {
			return null;
		} else {
			List<String> valuesLst = new ArrayList<String>();
			for (String value : values) {
				if (CheckUtil.isNotNull(value)) {
					valuesLst.add(value);
				}
			}
			return (String[]) valuesLst.toArray(new String[valuesLst.size()]);
		}
	}

	/**
	 * 提取字符串中的整數(shù)字
	 * 
	 * @param txt
	 * @return
	 */
	public static int conversionStringToNum(String txt) {
		try {
			return Integer.parseInt(conversionStringToString("[^0-9]", txt));
		} catch (Exception e) {
			return 0;
		}
	}

	/**
	 * 提取字符串中的數(shù)字
	 * 
	 * @param txt
	 * @return
	 */
	public static String conversionStringToNumber(String txt) {
		return conversionStringToString("[^0-9\\.-]", txt);
	}

	/**
	 * 提取字符串中的數(shù)字
	 * 
	 * @param txt
	 * @return
	 */
	public static String conversionStringToString(String regEx, String txt) {
		if (CheckUtil.isNull(txt))
			return null;
		// String regEx = "[^0-9]";
		Pattern p = Pattern.compile(regEx);
		Matcher m = p.matcher(txt);
		// 替換非數(shù)字字符
		String str = m.replaceAll("").trim();
		return str;
	}

	/**
	 * 取得布爾值
	 * 
	 * @param txt
	 * @return
	 */
	@Deprecated
	public static boolean getBoolean(String txt) {
		try {
			return Boolean.parseBoolean(txt);
		} catch (Exception e) {
			log.error(e.getMessage());
			return false;
		}
	}

	/**
	 * 取得Long值
	 * 
	 * @param txt
	 * @return
	 */
	@Deprecated
	public static long getLong(String txt) {
		try {
			return Long.parseLong(txt);
		} catch (Exception e) {
			log.error(e.getMessage());
			return 0l;
		}
	}

	/**
	 * 獲取批量集合值
	 * 
	 * @param batchList
	 *            集合數(shù)據(jù)
	 * @param batchSize
	 *            每頁顯示條數(shù)
	 * @author 張軍
	 * @date 2015-11-03 21:59:00
	 * @modifiyNote
	 * @version 1.0
	 * @return 批量集合值
	 */
	public static <T> List<List<T>> getBatchList(List<T> batchList, int batchSize) {
		List<List<T>> batchLists = new ArrayList<List<T>>();
		if (batchSize == 0) {
			return batchLists;
		}
		List<T> tempBatchList = null;
		int mod = batchList.size() % batchSize;
		int remainder = batchList.size() / batchSize;
		for (int i = 0; i < remainder; i++) {
			tempBatchList = new ArrayList<T>();
			for (int j = 1 + batchSize * i; j <= batchSize * (i + 1); j++) {
				tempBatchList.add(batchList.get(j - 1));
			}
			batchLists.add(tempBatchList);
		}
		if (mod != 0) {
			tempBatchList = new ArrayList<T>();
			for (int i = batchSize * remainder; i < batchList.size(); i++) {
				tempBatchList.add(batchList.get(i));
			}
			batchLists.add(tempBatchList);
		}
		return batchLists;
	}

	/**
	 * 獲取固定批量集合
	 * 
	 * @param batchList
	 *            集合數(shù)據(jù)
	 * @param batchSize
	 *            批量集合大小
	 * @author 張軍
	 * @date 2015-11-03 21:59:00
	 * @modifiyNote
	 * @version 1.0
	 * @return 批量集合
	 */
	public static <T> List<List<T>> getFixedBatchList(List<T> batchList, int batchSize) {
		List<List<T>> batchLists = new ArrayList<List<T>>();
		if (batchSize == 0) {
			return batchLists;
		}
		int count = batchList.size();
		// 每個(gè)線程處理的集合數(shù)
		int preCount = count / batchSize;
		// 判斷是否整除線程數(shù)
		int modCount = count % batchSize;
		if (modCount != 0) {
			preCount++;
		}
		// 記錄索引
		int index = 0;
		List<T> tempTask = new ArrayList<T>();
		batchLists.add(tempTask);
		for (int i = 0; i < count; i++) {
			T value = batchList.get(i);
			tempTask.add(value);
			if (i != count - 1) {
				// 如果非最后一個(gè)元素
				index++;
				// 如果等于計(jì)算出來的每頁條數(shù)
				if (index == preCount) {
					// 實(shí)例化集合
					tempTask = new ArrayList<T>();
					batchLists.add(tempTask);
					// 重新開始
					index = 0;
				}
			}
		}
		return batchLists;
	}

	/**
	 * 根據(jù)頁碼條數(shù)計(jì)算多少頁
	 * 
	 * @param total
	 *            總條數(shù)
	 * @param rows
	 *            每頁顯示條數(shù)
	 * @author 張軍
	 * @date 2015-11-03 21:59:00
	 * @modifiyNote
	 * @version 1.0
	 * @return 總頁數(shù)
	 */
	public static int calcPageCount(int total, int rows) {
		int pageCount = total / rows;
		int mod = total % rows;
		if (mod != 0) {
			pageCount++;
		}
		return pageCount;
	}

	/**
	 * 根據(jù)總條數(shù)獲取固定頁數(shù)
	 * 
	 * @param total
	 *            總條數(shù)
	 * @param rows
	 *            每頁顯示條數(shù)
	 * @param page
	 *            當(dāng)前頁
	 * @param showPageCount
	 *            顯示多少頁
	 * 
	 * @author 張軍
	 * @date 2015-11-03 21:59:00
	 * @modifiyNote
	 * @version 1.0
	 * @return 集合對(duì)象
	 * @see 開始頁:map.get("startPage")
	 * @see 結(jié)束頁:map.get("pageCount")
	 */
	public static Map<String, Object> calcPageCount(int total, int rows, int page, int showPageCount) {
		int pageCount = calcPageCount(total, rows);
		return calcPageCount(pageCount, page, showPageCount);
	}

	/**
	 * 根據(jù)總條數(shù)獲取固定頁數(shù)
	 * 
	 * @param pageCount
	 *            總頁碼
	 * @param page
	 *            當(dāng)前頁
	 * @param showPageCount
	 *            顯示多少頁
	 * 
	 * @author 張軍
	 * @date 2015-11-03 21:59:00
	 * @modifiyNote
	 * @version 1.0
	 * @return 集合對(duì)象
	 * @see 開始頁:map.get("startPage")
	 * @see 結(jié)束頁:map.get("pageCount")
	 */
	public static Map<String, Object> calcPageCount(int pageCount, int page, int showPageCount) {
		Map<String, Object> map = new HashMap<String, Object>();
		// 最新開始頁碼值
		int newStartPage = 1;
		// 最新結(jié)束頁碼值
		int newPageCount = pageCount;
		// 計(jì)算左右顯示的頁碼個(gè)數(shù)
		int prePageCount = showPageCount / 2;
		// 判斷右邊顯示的頁碼個(gè)數(shù)
		int modPageCount = showPageCount % 2;
		// 右邊多取個(gè)頁碼
		int leftPageCount = prePageCount;
		int rightPageCount = prePageCount;
		if (modPageCount == 0) {
			rightPageCount = rightPageCount - 1;
		}
		// 如果當(dāng)前頁碼值大于指定的頁碼個(gè)數(shù)
		if (page > prePageCount) {
			// 右邊頁碼個(gè)數(shù)的最后一個(gè)頁碼
			int endPage = page + rightPageCount;
			// 如果小于總頁碼個(gè)數(shù)
			if (endPage < pageCount) {
				// 賦值右邊頁碼個(gè)數(shù)的最后一個(gè)頁碼
				newPageCount = endPage;
			}
			// 左邊頁碼個(gè)數(shù)的第一個(gè)頁碼
			newStartPage = page - leftPageCount;
			// 取得當(dāng)前頁面后的右邊頁碼個(gè)數(shù)(如果rightPageCountCheck=0時(shí),newStartPage=0,所以下面會(huì)有判斷newStartPage是否小于等于0)
			int rightPageCountCheck = newPageCount - page;
			if (rightPageCountCheck < rightPageCount) {
				// 判斷右邊頁碼個(gè)數(shù)沒有達(dá)到和左邊的頁碼個(gè)數(shù)一至
				// 取得右邊頁碼個(gè)數(shù)相差頁碼個(gè)數(shù)
				int rightDiffPageCount = rightPageCount - rightPageCountCheck;
				// 如果未達(dá)到,則當(dāng)前頁碼前面的頁碼總數(shù)向前移動(dòng),使得頁碼達(dá)到11個(gè)頁碼
				newStartPage = newStartPage - rightDiffPageCount;
			}
		} else {
			if (pageCount > showPageCount - 1) {
				// 如果頁碼個(gè)數(shù)大于10,則輸出最大頁碼個(gè)數(shù)11個(gè)
				newPageCount = showPageCount;
			}
		}
		if (newStartPage <= 0) {
			// 開始頁碼從1開始
			newStartPage = 1;
		}
		// 設(shè)置返回值
		map.put("startPage", newStartPage);
		map.put("pageCount", newPageCount);
		return map;
	}

	/**
	 * 獲取最后分割符前面的字符串
	 * 
	 * @param text
	 * @param split
	 * @return
	 */
	public static String getBeforeTextLastDelimiter(String text, String split) {
		if (text == null)
			return null;
		if ("".equals(text))
			return "";
		int lastIndex = text.lastIndexOf(split);
		if (lastIndex != -1) {
			text = text.substring(0, lastIndex);
		}
		return text;
	}

	/**
	 * 去除小數(shù)點(diǎn)后的字符
	 * 
	 * @param text
	 * @param split
	 * @return
	 */
	public static Object getIsNumValue(Object value) {
		if (value == null)
			return null;
		if ("".equals(value))
			return "";
		String stext = value.toString();
		int lastIndex = stext.lastIndexOf(".");
		if (lastIndex == -1) {
			return value;
		}
		String beforeText = getBeforeTextLastDelimiter(stext, ".");
		String afterText = getAfterTextLastDelimiter(stext, ".");
		// System.out.println(beforeText);
		// System.out.println(afterText);
		if (CheckUtil.isPlusNum(beforeText) && CheckUtil.isPlusNum(afterText)) {
			if (BigDecimal.ZERO.compareTo(new BigDecimal(afterText)) == 0) {
				return beforeText;
			} else {
				return value;
			}
		} else {
			return value;
		}
	}

	/**
	 * 獲取最后分割符后面的字符串
	 * 
	 * @param text
	 * @param split
	 * @return
	 */
	public static String getAfterTextLastDelimiter(String text, String split) {
		if (text == null)
			return null;
		if ("".equals(text))
			return "";
		int lastIndex = text.lastIndexOf(split);
		if (lastIndex != -1) {
			text = text.substring(lastIndex + 1);
		}
		return text;
	}

	/**
	 * 獲取map中的值為map對(duì)象
	 * 
	 * @param map
	 * @param key
	 * @return
	 */
	@SuppressWarnings("unchecked")
	public static synchronized <K, V> Map<K, V> getValueForMap(Map<K, V> map, String key) {
		Map<K, V> valueMap = null;
		Object value = null;
		if (map == null) {
			valueMap = new HashMap<K, V>();
		} else {
			value = map.get(key);
			valueMap = value instanceof Map ? (Map<K, V>) value : new HashMap<K, V>();
		}
		return valueMap;
	}

	/**
	 * 獲取map中的值為list.map對(duì)象
	 * 
	 * @param map
	 * @param key
	 * @return
	 */
	@SuppressWarnings("unchecked")
	public static synchronized <K, V> List<Map<K, V>> getValueForListMap(Map<K, V> map, String key) {
		List<Map<K, V>> valueListMap = null;
		Object value = null;
		if (map == null) {
			valueListMap = new ArrayList<Map<K, V>>();
		} else {
			value = map.get(key);
			valueListMap = value instanceof List ? (List<Map<K, V>>) value : new ArrayList<Map<K, V>>();
		}
		return valueListMap;
	}

	/**
	 * 獲取map中的值為list對(duì)象
	 * 
	 * @param map
	 * @param key
	 * @return
	 */
	@SuppressWarnings("unchecked")
	public static synchronized <K, V, L> List<L> getValueForList(Map<K, V> map, String key) {
		List<L> valueListMap = null;
		Object value = null;
		if (map == null) {
			valueListMap = new ArrayList<L>();
		} else {
			value = map.get(key);
			valueListMap = value instanceof List ? (List<L>) value : new ArrayList<L>();
		}
		return valueListMap;
	}

	/**
	 * list轉(zhuǎn)set
	 * 
	 * @param map
	 * @param key
	 * @return
	 */
	public static <T> Set<T> listToSet(List<T> P_coll) {
		Set<T> R_coll = new HashSet<T>();
		if (P_coll == null) {
			return R_coll;
		} else {
			for (T V_t : P_coll) {
				R_coll.add(V_t);
			}
		}
		return R_coll;
	}

	/**
	 * set轉(zhuǎn)list
	 * 
	 * @param map
	 * @param key
	 * @return
	 */
	public static <T> List<T> setToList(Set<T> P_coll) {
		List<T> R_coll = new ArrayList<T>();
		if (P_coll == null) {
			return R_coll;
		} else {
			for (T V_t : P_coll) {
				R_coll.add(V_t);
			}
		}
		return R_coll;
	}

	/**
	 * 判斷兩數(shù)組相同
	 * 
	 * @param a1
	 * @param a2
	 * @return
	 */
	public static boolean arrayEquals(Object[] a1, Object[] a2) {
		if (a1 == null) {
			return a2 == null || a2.length == 0;
		}

		if (a2 == null) {
			return a1.length == 0;
		}

		if (a1.length != a2.length) {
			return false;
		}

		for (int i = 0; i < a1.length; i++) {
			if (a1[i] != a2[i]) {
				return false;
			}
		}

		return true;
	}

	/**
	 * 判斷兩集合是否相同
	 * 
	 * @param list1
	 * @param list2
	 * @return
	 */
	public static boolean collEquals(Collection<Object> list1, Collection<Object> list2) {
		// 個(gè)數(shù)相同
		boolean ok = true;
		boolean isCheck = false;
		quit: while (list1.size() != 0 && list1.size() == list2.size()) {
			isCheck = true;
			for (Object value : list1) {
				if (list2.contains(value)) {
					list2.remove(value);
					list1.remove(value);
					break;
				} else {
					ok = false;
					break quit;
				}
			}
		}
		// if (isCheck && ok) {
		// System.out.println("集合相同");
		// } else {
		// System.out.println("集合不相同");
		// }
		return isCheck && ok;
	}

	/**
	 * 判斷兩集合是否相同
	 * 
	 * @param list1
	 * @param list2
	 * @return
	 */
	public static boolean collEqualsStr(Collection<String> list1, Collection<String> list2) {
		List<Object> list1Obj = new ArrayList<Object>();
		List<Object> list2Obj = new ArrayList<Object>();
		for (String v : list1) {
			list1Obj.add(v);
		}
		for (String v : list2) {
			list2Obj.add(v);
		}
		return collEquals(list1Obj, list2Obj);
	}

	/**
	 * 首字母變小寫
	 * 
	 * @param text
	 *            字符串
	 * @return 以第一個(gè)字母小寫其他不變
	 */
	public static String firstLowerCase(String text) {
		return text.substring(0, 1).toLowerCase() + text.substring(1, text.length());
	}

	/**
	 * 首字母變大寫
	 * 
	 * @param text
	 * @return
	 */
	public static String firstUpperCase(String text) {
		return text.substring(0, 1).toUpperCase() + text.substring(1, text.length());
	}

	/**
	 * 以分割符split首字母變大寫(默認(rèn)第一個(gè)字符不改變大寫)
	 * 
	 * @param text
	 *            校驗(yàn)字符串
	 * @param split
	 *            分割符
	 * @return 轉(zhuǎn)換后的結(jié)果
	 */
	public static String upperCaseSplit(String text, String split) {
		return upperCaseSplit(text, split, false);
	}

	/**
	 * 以分割符split首字母變大寫
	 * 
	 * @param text
	 *            校驗(yàn)字符串
	 * @param split
	 *            分割符
	 * @param first
	 *            是否首字母大寫
	 * @return 轉(zhuǎn)換后的結(jié)果
	 */
	public static String upperCaseSplit(String text, String split, boolean first) {
		String[] texts = split(text, split);
		String newText = "";
		for (int i = 0; i < texts.length; i++) {
			String str = texts[i];
			if (CheckUtil.isNull(str)) {
				continue;
			}
			if (i == 0) {
				if (first) {
					newText += firstUpperCase(str);
				} else {
					newText += str;
				}
			} else {
				newText += firstUpperCase(str);
			}
		}
		return newText;
	}

	/**
	 * 轉(zhuǎn)換數(shù)據(jù)庫字段為java屬性
	 * 
	 * @param text
	 *            數(shù)據(jù)庫字段名
	 * @author 張軍
	 * @date 2015-11-03 21:59:00
	 * @modifiyNote
	 * @version 1.0
	 * @return
	 */
	public static String convertDbToJavaField(String text) {
		return JavaUtil.upperCaseSplit(JavaUtil.toLowerCase(text), "_");
	}

	/**
	 * 改變第一行bug BufferedReader.readLine()讀取第一行會(huì)出現(xiàn)bug,首行第一個(gè)字符會(huì)是一個(gè)空字符  line = br.readLine(); line = readFirstLine(line); 文件保存為UTF-8格式,會(huì)出現(xiàn)此問題(例如:文件內(nèi)容第一行以#號(hào)開頭) stream/a.txt不正常,b.txt正常
	 * 
	 * @param line
	 * @return
	 * @author zhangjun
	 */
	public static String readFirstLine(String line) {
		if (line == null)
			return null;
		line = line.trim();
		if ("".equals(line)) {
			return line;
		}
		char s = line.charAt(0);
		int hc = String.valueOf(s).hashCode();
		if (hc == 65279) {
			if (line.length() > 1) {
				line = line.substring(1);
			} else {
				line = "";
			}
		}
		return line;
	}

	/**
	 * 隨機(jī)數(shù)
	 * 
	 * @author zhangjun
	 * 
	 */
	public static class RandomUtil {
		private static Random RD = null;
		static {
			RD = new Random();
		}

		/**
		 * 獲取[s-e]之間的隨機(jī)數(shù)
		 * 
		 * @param s
		 *            開始數(shù)字
		 * @param e
		 *            結(jié)束數(shù)字
		 * @return 隨機(jī)數(shù)
		 */
		public static int getInt(int s, int e) {
			return RD.nextInt(e - s + 1) + s;
		}
	}

	/**
	 * 獲取手機(jī)號(hào)去掉+86
	 *
	 * @param P_mobile
	 *            手機(jī)號(hào)
	 * @return
	 */
	public static String getMobile(String P_mobile) {
		if (CheckUtil.isNull(P_mobile)) {
			return "";
		}
		if (P_mobile.startsWith("+86")) {
			// 去除
			P_mobile = P_mobile.substring(3);
		}
		return P_mobile;
	}

	/**
	 * 字符串轉(zhuǎn)set
	 *
	 * @param value
	 *            字符串
	 * @return
	 */
	public static Set<String> strToSet(String value) {
		return strToSet(value, ",");
	}

	/**
	 * 字符串轉(zhuǎn)list
	 *
	 * @param value
	 *            字符串
	 * @return
	 */
	public static List<String> strToList(String value) {
		return strToList(value, ",");
	}

	/**
	 * 字符串轉(zhuǎn)set
	 *
	 * @param value
	 *            字符串
	 * @param split
	 *            分割符
	 * @return
	 */
	public static Set<String> strToSet(String value, String split) {
		Set<String> V_toIds = new HashSet<>();
		String[] R_sysIdsAry = JavaUtil.split(value, split);
		for (String VF_value : R_sysIdsAry) {
			V_toIds.add(VF_value);
		}
		return V_toIds;
	}

	/**
	 * 字符串轉(zhuǎn)list
	 *
	 * @param value
	 *            字符串
	 * @param split
	 *            分割符
	 * @return
	 */
	public static List<String> strToList(String value, String split) {
		List<String> V_toIds = new ArrayList<>();
		String[] R_sysIdsAry = JavaUtil.split(value, split);
		for (String VF_value : R_sysIdsAry) {
			V_toIds.add(VF_value);
		}
		return V_toIds;
	}
}
/**
 * @Description  TestJavaUtil.java
 * @author 張軍
 * @date 2022年3月6日 上午10:48:53
 * @version V1.0
 */
package test.java;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.junit.Test;

import zj.check.util.CheckUtil;
import zj.java.util.JavaUtil;

/**
 * @author 張軍
 * @date 2022年3月6日 上午10:48:53
 * @version V1.0
 */
public class TestJavaUtil {
	@Test
	public void 分割email地址轉(zhuǎn)換成一行() {
		String 前臺(tái)傳的email值 = "";
		for (int a = 1; a <= 5; a++) {
			if (CheckUtil.isNotNull(前臺(tái)傳的email值)) {
				前臺(tái)傳的email值 += "\r\n";
			}
			前臺(tái)傳的email值 += "zhangjun" + a + "@126.com";
		}
		System.out.println("前臺(tái)傳的email值:\n" + 前臺(tái)傳的email值);
		String 分割后結(jié)果 = JavaUtil.emailSplitToOneline(前臺(tái)傳的email值);
		System.out.println("分割后結(jié)果:\n" + 分割后結(jié)果);
	}

	@Test
	public void 判斷系統(tǒng)() {
		System.out.println("是否是windows:" + JavaUtil.isWindows());
		System.out.println("是否是mac系統(tǒng):" + JavaUtil.isMac());
	}

	@Test
	public void 中文數(shù)字轉(zhuǎn)數(shù)字() {
		System.out.println("中文數(shù)字轉(zhuǎn)數(shù)字:" + JavaUtil.getIntegerByStr("六萬七千三百八十二"));
		System.out.println("中文數(shù)字轉(zhuǎn)數(shù)字:" + JavaUtil.getIntegerByStr("五千零一"));
	}

	@Test
	public void 數(shù)字轉(zhuǎn)大寫() {
		System.out.println("數(shù)字轉(zhuǎn)大寫:" + JavaUtil.numToCnChar("1234567890"));
	}

	@Test
	public void 數(shù)字轉(zhuǎn)大寫日期() {
		System.out.println("4位數(shù)字年:" + JavaUtil.numToCnCharDate(2022));
		System.out.println("2位數(shù)字月或日:" + JavaUtil.numToCnCharDate(12));
		System.out.println("1位數(shù)字月或日:" + JavaUtil.numToCnCharDate(9));
	}

	@Test
	public void 數(shù)值轉(zhuǎn)換為中文字符串() {
		System.out.println("數(shù)值轉(zhuǎn)換為中文字符串:" + JavaUtil.numToCn(20221231));
		System.out.println("第2個(gè)參數(shù)是否口語化。例如12轉(zhuǎn)換為'十二'而不是'一十二'。:" + JavaUtil.numToCnCharDate(12));
	}

	@Test
	public void 獲取集合差異() {
		List<String> l1 = new ArrayList<>();
		l1.add("a");
		l1.add("b");
		l1.add("c");
		l1.add("d");
		l1.add("e");
		List<String> l2 = new ArrayList<>();
		l2.add("a1");
		l2.add("b");
		l2.add("c1");
		l2.add("d");
		l2.add("e1");
		System.out.println("獲取集合差異:" + JavaUtil.diffColl(l1, l2));
	}

	@Test
	public void 數(shù)字格式化() {
		System.out.println("數(shù)字格式化:" + JavaUtil.covertToNumSplit(1234567890));
	}

	@Test
	public void 轉(zhuǎn)為大數(shù)字() {
		System.out.println("轉(zhuǎn)為大數(shù)字:" + JavaUtil.covertBigDecimal(1234567890));
		System.out.println("轉(zhuǎn)為大數(shù)字:" + JavaUtil.covertBigDecimal("1234567890123456789").setScale(5, BigDecimal.ROUND_HALF_UP));
	}

	@Test
	public void 獲取in的字符串() {
		List<String> l2 = new ArrayList<>();
		l2.add("a1");
		l2.add("b");
		l2.add("c1");
		l2.add("d");
		l2.add("e1");
		System.out.println("獲取in的字符串: in(" + JavaUtil.sqlInStr(l2) + ")");
	}

	@Test
	public void 轉(zhuǎn)換文件大小() {
		System.out.println("轉(zhuǎn)換文件大小為B、KB、MB、GB:" + JavaUtil.convertFileSize(123456));
		System.out.println("轉(zhuǎn)換文件大小為B、KB、MB、GB:" + JavaUtil.convertFileSize(1234567890));
	}

	@Test
	public void 深度拷貝list數(shù)據(jù)() {
		List<String> 源集合 = new ArrayList<>();
		源集合.add("a");
		源集合.add("b");
		源集合.add("c");
		源集合.add("d");
		源集合.add("e");
		List<String> 目標(biāo)集合 = JavaUtil.deepCopy(源集合);
		源集合.remove(0);
		源集合.remove(1);
		System.out.println("源集合:" + 源集合);
		System.out.println("移除src里的元素,dest元素不會(huì)發(fā)生變化");
		System.out.println("目標(biāo)集合:" + 目標(biāo)集合);
	}

	@Test
	public void 合并多個(gè)數(shù)組() {
		String[] 數(shù)組1 = new String[] { "a", "b", "c" };
		String[] 數(shù)組2 = new String[] { "d", "e", "f" };
		String[] 數(shù)組3 = new String[] { "11", "22", "33" };
		System.out.println("數(shù)組1:" + Arrays.toString(數(shù)組1));
		System.out.println("數(shù)組2:" + Arrays.toString(數(shù)組2));
		System.out.println("數(shù)組3...n:" + Arrays.toString(數(shù)組3));
		System.out.println("合并N個(gè)數(shù)組:" + Arrays.toString(JavaUtil.concatArrayAll(數(shù)組1, 數(shù)組2, 數(shù)組3)));
	}

	@Test
	public void 按實(shí)際字符分割字符串() {
		String 字符串 = "a.b.c.d.e";
		System.out.println("按實(shí)際字符分割字符串:" + Arrays.toString(JavaUtil.split(字符串, ".")));
	}

	@Test
	public void LIST轉(zhuǎn)數(shù)組() {
		List<String> 源集合 = new ArrayList<>();
		源集合.add("a");
		源集合.add("b");
		源集合.add("c");
		源集合.add("d");
		源集合.add("e");
		System.out.println("LIST轉(zhuǎn)數(shù)組:" + Arrays.toString(JavaUtil.listToArray(源集合, String.class)));
	}

	@Test
	public void 獲取最大長度文字() {
		System.out.println("獲取最大長度文字:" + JavaUtil.getMaxText("獲取最大長度文字", 3));
	}

	@Test
	public void 去除數(shù)組中為null或空的值() {
		String[] 數(shù)組1 = new String[] { "a", "b", "c", "", "", null, "\n", "666666666" };
		System.out.println("去除數(shù)組前的值:" + Arrays.toString(數(shù)組1));
		System.out.println("去除數(shù)組中為null或空的值:" + Arrays.toString(JavaUtil.aryTrimValue(數(shù)組1)));
	}

	@Test
	public void 提取字符串中的整數(shù)字() {
		System.out.println("提取字符串:" + "我是123中456國7890結(jié)束");
		System.out.println("提取字符串中的整數(shù)字:" + JavaUtil.conversionStringToNum("我是123中456國7890結(jié)束"));
	}

	@Test
	public void 提取字符串中的整數(shù)字帶小數(shù)或正負(fù)數(shù)() {
		System.out.println("提取字符串:" + "我是-123中456國7.890結(jié)束");
		System.out.println("提取字符串中的整數(shù)字帶小數(shù)或正負(fù)數(shù):" + JavaUtil.conversionStringToNumber("我是-123中456國7.890結(jié)束"));
	}

	@Test
	public void 固定集合元素() {
		int count = 10;
		List<String> 原集合值 = new ArrayList<String>();
		for (int i = 0; i < count; i++) {
			原集合值.add("值:" + i);
		}
		System.out.println("原集合值:" + 原集合值);
		List<List<String>> 固定批量值 = JavaUtil.getBatchList(原集合值, 3);
		System.out.println("固定集合元素,每個(gè)集合3個(gè)元素:" + 固定批量值);
	}

	@Test
	public void 固定批量集合() {
		int count = 10;
		List<String> 原集合值 = new ArrayList<String>();
		for (int i = 0; i < count; i++) {
			原集合值.add("值:" + i);
		}
		System.out.println("原集合值:" + 原集合值);
		List<List<String>> 固定批量值 = JavaUtil.getFixedBatchList(原集合值, 3);
		System.out.println("固定批量集合,3個(gè)批次元素:" + 固定批量值);
	}

	@Test
	public void 根據(jù)頁碼條數(shù)計(jì)算多少頁() {
		System.out.println("總條數(shù):" + 10);
		System.out.println("每頁顯示條數(shù):" + 3);
		System.out.println("根據(jù)頁碼條數(shù)計(jì)算多少頁:" + JavaUtil.calcPageCount(10, 3));
	}

	@Test
	public void 獲取最后分割符前面的字符串() {
		String 字符串 = "獲取最后分割符#前面的字符串";
		System.out.println("字符串:" + 字符串);
		System.out.println("獲取最后分割符#前面的字符串:" + JavaUtil.getBeforeTextLastDelimiter(字符串, "#"));
	}

	@Test
	public void 獲取最后分割符后面的字符串() {
		String 字符串 = "獲取最后分割符#前面的字符串";
		System.out.println("字符串:" + 字符串);
		System.out.println("獲取最后分割符#前面的字符串:" + JavaUtil.getAfterTextLastDelimiter(字符串, "#"));
	}

	@Test
	public void 去除小數(shù)點(diǎn)后的字符() {
		System.out.println("去除前字符:123.12345000");
		System.out.println("去除小數(shù)點(diǎn)后為0的字符:" + JavaUtil.getIsNumValue(123.12345000));
		System.out.println("去除前字符:12345678.00000");
		System.out.println("去除小數(shù)點(diǎn)后為0的字符:" + JavaUtil.getIsNumValue("12345678.00000"));
	}

	@Test
	public void 獲取map中的值為map對(duì)象() {
		Map<String, Map<String, Object>> map = new HashMap<>();
		Map<String, Object> value = new HashMap<>();
		value.put("test", "我是值a");
		map.put("a", value);
		value = new HashMap<>();
		value.put("test", "我是值b");
		map.put("b", value);
		value = new HashMap<>();
		value.put("test", "我是值c");
		map.put("c", value);
		System.out.println("map:" + map);
		System.out.println("獲取map中key為b的值為map對(duì)象:" + JavaUtil.getValueForMap(map, "b"));
		System.out.println("獲取map中key為d的值為map對(duì)象:" + JavaUtil.getValueForMap(map, "d"));
	}

	@Test
	public void 獲取map中的值為list_map對(duì)象() {
		Map<String, List<Map<String, Object>>> map = new HashMap<>();
		List<Map<String, Object>> values = new ArrayList<>();
		
		Map<String, Object> value = new HashMap<>();
		values.add(value);
		value.put("test", "我是值a");
		map.put("a", values);

		value = new HashMap<>();
		values.add(value);
		value.put("test", "我是值b");
		map.put("b", values);

		value = new HashMap<>();
		values.add(value);
		value.put("test", "我是值c");
		map.put("c", values);

		System.out.println("map:" + map);
		System.out.println("獲取map中的值為list.map對(duì)象:" + JavaUtil.getValueForListMap(map, "b"));
		System.out.println("獲取map中的值為list.map對(duì)象:" + JavaUtil.getValueForListMap(map, "d"));
	}
}
map:{b=[{test=我是值a}, {test=我是值b}, {test=我是值c}], c=[{test=我是值a}, {test=我是值b}, {test=我是值c}], a=[{test=我是值a}, {test=我是值b}, {test=我是值c}]}
獲取map中的值為list.map對(duì)象:[{test=我是值a}, {test=我是值b}, {test=我是值c}]
獲取map中的值為list.map對(duì)象:[]
map:{b={test=我是值b}, c={test=我是值c}, a={test=我是值a}}
獲取map中key為b的值為map對(duì)象:{test=我是值b}
獲取map中key為d的值為map對(duì)象:{}
原集合值:[值:0, 值:1, 值:2, 值:3, 值:4, 值:5, 值:6, 值:7, 值:8, 值:9]
固定批量集合,3個(gè)批次元素:[[值:0, 值:1, 值:2, 值:3], [值:4, 值:5, 值:6, 值:7], [值:8, 值:9]]
獲取集合差異:[e1, e, c1, c, a, a1]
原集合值:[值:0, 值:1, 值:2, 值:3, 值:4, 值:5, 值:6, 值:7, 值:8, 值:9]
固定集合元素,每個(gè)集合3個(gè)元素:[[值:0, 值:1, 值:2], [值:3, 值:4, 值:5], [值:6, 值:7, 值:8], [值:9]]
數(shù)字格式化:1,234,567,890
數(shù)字轉(zhuǎn)大寫:一二三四五六七八九零
數(shù)組1:[a, b, c]
數(shù)組2:[d, e, f]
數(shù)組3...n:[11, 22, 33]
合并N個(gè)數(shù)組:[a, b, c, d, e, f, 11, 22, 33]
提取字符串:我是123中456國7890結(jié)束
提取字符串中的整數(shù)字:1234567890
數(shù)值轉(zhuǎn)換為中文字符串:二千零二十二萬一千二百三十一
第2個(gè)參數(shù)是否口語化。例如12轉(zhuǎn)換為'十二'而不是'一十二'。:十二
4位數(shù)字年:二零二二
2位數(shù)字月或日:十二
1位數(shù)字月或日:九
提取字符串:我是-123中456國7.890結(jié)束
提取字符串中的整數(shù)字帶小數(shù)或正負(fù)數(shù):-1234567.890
轉(zhuǎn)為大數(shù)字:1234567890
轉(zhuǎn)為大數(shù)字:1234567890123456789.00000
是否是windows:true
是否是mac系統(tǒng):false
LIST轉(zhuǎn)數(shù)組:[a, b, c, d, e]
前臺(tái)傳的email值:
zhangjun1@126.com
zhangjun2@126.com
zhangjun3@126.com
zhangjun4@126.com
zhangjun5@126.com
分割后結(jié)果:
zhangjun1@126.com;zhangjun2@126.com;zhangjun3@126.com;zhangjun4@126.com;zhangjun5@126.com
字符串:獲取最后分割符#前面的字符串
獲取最后分割符#前面的字符串:前面的字符串
字符串:獲取最后分割符#前面的字符串
獲取最后分割符#前面的字符串:獲取最后分割符
獲取in的字符串: in('a1','b','c1','d','e1')
獲取最大長度文字:獲取最...
去除前字符:123.12345000
去除小數(shù)點(diǎn)后為0的字符:123.12345
去除前字符:12345678.00000
去除小數(shù)點(diǎn)后為0的字符:12345678
去除數(shù)組前的值:[a, b, c, , , null, 
, 666666666]
去除數(shù)組中為null或空的值:[a, b, c, 666666666]
按實(shí)際字符分割字符串:[a, b, c, d, e]
轉(zhuǎn)換文件大小為B、KB、MB、GB:120.56KB
轉(zhuǎn)換文件大小為B、KB、MB、GB:1.15GB
中文數(shù)字轉(zhuǎn)數(shù)字:67382
中文數(shù)字轉(zhuǎn)數(shù)字:5001
總條數(shù):10
每頁顯示條數(shù):3
根據(jù)頁碼條數(shù)計(jì)算多少頁:4
源集合:[b, d, e]
移除src里的元素,dest元素不會(huì)發(fā)生變化
目標(biāo)集合:[a, b, c, d, e]

更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號(hào)聯(lián)系: 360901061

您的支持是博主寫作最大的動(dòng)力,如果您喜歡我的文章,感覺我的文章對(duì)您有幫助,請(qǐng)用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點(diǎn)擊下面給點(diǎn)支持吧,站長非常感激您!手機(jī)微信長按不能支付解決辦法:請(qǐng)將微信支付二維碼保存到相冊(cè),切換到微信,然后點(diǎn)擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對(duì)您有幫助就好】

您的支持是博主寫作最大的動(dòng)力,如果您喜歡我的文章,感覺我的文章對(duì)您有幫助,請(qǐng)用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會(huì)非常 感謝您的哦!!!

發(fā)表我的評(píng)論
最新評(píng)論 總共0條評(píng)論
主站蜘蛛池模板: 亚洲国产99在线精品一区69堂 | 99在线观看精品 | 国内精品视频九九九九 | 国产精品九九热 | 国产亚洲精品久久精品6 | 老潮湿影院免费体验区 | 欧美精品综合一区二区三区 | 日本在线看片网站 | 99九九精品免费视频观看 | 成人在线精品 | 日本免费一区二区三区在线看 | 在线观看欧美亚洲日本专区 | 国产aav | 91福利在线看 | 嫩模尺度私拍在线视频 | 国产精品麻豆视频 | 国产乱仑 | 国内一级特黄女人精品片 | 四虎永久在线免费观看 | 日韩免费大片 | 久久综合综合 | 中文国产成人久久精品小说 | 欧美性网 | 久青草国产在线视频亚瑟影视 | 五月天中文在线 | 久久久久国产精品美女毛片 | 性生大片一级毛片免费观看 | 奇米影视久久 | 九九精品视频在线播放 | 天天射天天草 | 国产欧美另类第一页 | 免费观看大片毛片 | 成人私人影院www片免费高清 | 久久久久久久久中文字幕 | 伊在人亚洲香蕉精品区麻豆 | 日本在线观看不卡免费视频 | 亚洲日韩欧美综合 | 天天热天天干 | 爱爱视频免费网址 | 国产精品久久免费观看 | 亚洲黄色a |