class CollectionHelper {

	public static <T> Map<T, Integer> createIndexMap(List<T> list) {
		Validate.notNull(list, "list must not be null");
		Map<T, Integer> map = new HashMap<>();
		for (int index = 0; index < list.size(); index++) {
			T item = list.get(index);
			if (!map.containsKey(item)) {
				map.put(item, index);
			}
		}
		return map;
	}

	private  CollectionHelper();

}