public static boolean wordBreak(String s, HashSet<String> dict) {
		int len = s.length();
		boolean res = false;
		//String tmpStr = s;
		Iterator<String> iterator=dict.iterator();
		String[] str = new String[len*len];
		int[] idx = new int[len*len];
		int i=0;
		int tmpidx;
		String repStr = "";
		int nextStart = 0;
		//while(iterator.hasNext()){
		int tmpLen = s.length()+1;
		String tmp = null;
		while( ( tmp =  findLongestString(dict , tmpLen ))!=null){
			 //tmp = (String)iterator.next();
System.out.println("DICT:"+tmp );
			tmpLen = tmp.length()+1;
			boolean gotOne = false;
			while( ( tmpidx = s.indexOf( tmp,nextStart ) ) >=0 ){//BUG
				str[i]=tmp;
				idx[i]=tmpidx;
				i++;
				nextStart = tmpidx + tmp.length();
				gotOne = true;
				if(gotOne){
					break;
				}
//System.out.println("NextStart:"+nextStart);				
			}
			nextStart=0;
		}
		CollectionTool.printArray(str);
//		CollectionTool.printArray(idx);
		int act_len = i;
		//int nextIdx = 0;		
//System.out.println("Find next:"+findNext(nextIdx, str[2].length() ,idx));

		for(int k=0;k<act_len;k++){
			if(idx[k]==0){
System.out.println("STR:"+str[k]);
				int totalen = str[k].length();
				int nowIdx = 0;
				int nextIdx = -1;
				int strNowIdx = k;
				while( ( nextIdx = findNextIdx( nowIdx , str[strNowIdx].length() , idx) )>=0){
System.out.println("BF-totalen:"+totalen+",nowIdx:"+nowIdx+",|strNowIdx:"+strNowIdx+",nextIdx:"+nextIdx);
System.out.println("NOW-IDX:"+ nowIdx  + ",Next IDX:"+nextIdx );
System.out.println("STR NOW:"+ str[strNowIdx]+",STR NXT:"+ str[nextIdx] );
					if( totalen <= s.length()){ //+ str[nextIdx ].length()
						totalen += str[nextIdx].length();
						nowIdx +=  str[strNowIdx].length(); 
						//nextIdx = nextIdx+str[tmpIdx].length()-1;
						strNowIdx = nextIdx;
					}
System.out.println("AF-totalen:"+totalen+",nowIdx:"+nowIdx+",strNowIdx:"+strNowIdx+",nextIdx:"+nextIdx);
System.out.println("--------");
				}
				//totalIdx += str[nextIdx].length();
				if( totalen == s.length()){
					return true;
				}
			}
		}
        return res;
    }