int index= Arrays.binarySearch(allTypes, key, AllTypesCache.getTypeNameComperator());
int index= Arrays.binarySearch(allTypes, key, fgTypeNameComparator);
	public static TypeInfo[] getTypesForName(String simpleTypeName, IJavaSearchScope searchScope, IProgressMonitor monitor) throws JavaModelException {		Collection result= new ArrayList();		Set namesFound= new HashSet();		TypeInfo[] allTypes= AllTypesCache.getAllTypes(monitor); // all types in workspace, sorted by type name		TypeInfo key= new UnresolvableTypeInfo("", simpleTypeName, null, true, null); //$NON-NLS-1$		int index= Arrays.binarySearch(allTypes, key, AllTypesCache.getTypeNameComperator());		if (index >= 0 && index < allTypes.length) {			for (int i= index - 1; i>= 0; i--) {				TypeInfo curr= allTypes[i];				if (simpleTypeName.equals(curr.getTypeName())) {					if (!namesFound.contains(curr.getFullyQualifiedName()) && curr.isEnclosed(searchScope)) {						result.add(curr);						namesFound.add(curr.getFullyQualifiedName());					}				} else {					break;				}			}				for (int i= index; i < allTypes.length; i++) {				TypeInfo curr= allTypes[i];				if (simpleTypeName.equals(curr.getTypeName())) {					if (!namesFound.contains(curr.getFullyQualifiedName()) && curr.isEnclosed(searchScope)) {						result.add(curr);						namesFound.add(curr.getFullyQualifiedName());					}				} else {					break;				}			}		}		return (TypeInfo[]) result.toArray(new TypeInfo[result.size()]);			}