public int compare(Object obj1, Object obj2) {

		String name1 = null;
		String name2 = null;

		if (obj1 instanceof Product) {
			Product pro1 = (Product) obj1;
			name1 = pro1.getName();
		} else {
			System.out.println("类型转换错误！");
		}

		if (obj1 instanceof Product) {
			Product pro2 = (Product) obj2;
			name2 = pro2.getName();
		} else {
			System.out.println("类型转换错误！");
		}

		Pattern pattern = Pattern.compile("\\D*(\\d+)\\D*");
		Matcher matcher1 = pattern.matcher(name1);
		Matcher matcher2 = pattern.matcher(name2);
		int index1_step = 0;
		int index2_step = 0;
		while (matcher1.find()) {
			String s1 = matcher1.group(1);
			String s2 = null;
			if (matcher2.find()) {
				s2 = matcher2.group(1);
			}
			int index1 = name1.indexOf(s1, index1_step);
			int index2 = name2.indexOf(s2, index2_step);
			index1_step = index1;
			index2_step = index2;
			if (index1 == index2) {
				String pre1 = name1.substring(0, index1);
				String pre2 = name2.substring(0, index2);
				if (pre1.equals(pre2)) {
					long num1 = Long.parseLong(s1);
					long num2 = Long.parseLong(s2);
					if (num1 == num2) {
						continue;
					} else {
						return (int) (num1 - num2);
					}
				} else {
					break;
				}
			} else {
				break;
			}
		}
		return collator.getCollationKey(name1).compareTo(
				collator.getCollationKey(name2));
	}