@Override
	public ArrayList<Object> searchGoods(String info) {
		class SearchUnit implements Comparator<Object>{
			int sum = 0;
			final int num;
			public SearchUnit(int i) {
				this.num = i;
			}
			public void plus() {
				sum ++;
			}
			@Override
			public int compare(Object o1, Object o2) {
				if(((SearchUnit)o1).sum > ((SearchUnit)o2).sum)
					return -1;
				if(((SearchUnit)o1).sum < ((SearchUnit)o2).sum)
					return 1;
				return 0;
			}
		}
		
		char[] infoCharList = info.toCharArray();
		ArrayList<SearchUnit> suList = new ArrayList<SearchUnit>();
		for (int i = 0; i < goodsList.size(); i ++) {
			suList.add(new SearchUnit(i));
		}
		
		char c;
		String s;
		for (int i = 0; i < infoCharList.length; i ++) {
			c = infoCharList[i];
			if(c == ' ') continue; //空字符跳过
			
			s = "" + c;
			for (int j = 0; j < suList.size(); j ++) {
				if(goodsList.get(j).getName().contains(s))
					suList.get(j).plus();
			}
			
		}
		
	    suList.sort(new SearchUnit(-1));
	    
	    
	    ArrayList<Object> gpl = new ArrayList<Object>();
		for (int i = 0; i < suList.size(); i ++) {
			if(suList.get(i).sum != 0)
				gpl.add(new GoodsPO(goodsList.get(suList.get(i).num)));
			else
				break;
		}
		
		
		return gpl;
	}