@SuppressWarnings({ "unchecked", "rawtypes" })
    public BeanIndexer<K> addSortedIndex(String property,
	    Comparator<?> comparator) {
	Map<Object, Set<K>> holder = index.get(property);
	if (holder instanceof NavigableMap<?, ?>) {
	    return this;
	}
	if (holder != null) {
	    removeIndex(property);
	}
	holder = new TreeMap<Object, Set<K>>((Comparator) comparator);
	index.put(property, holder);
	indexBeans(property, elements);
	return this;

    }