* @return
	 */
	public static <E> ArrayList<E> removeDuplicates2(
			Iterable<E> list) {
		E last = null;
		int count = 0;
		for (E e : list) {
			if (last == null || !last.equals(e)) {
				count ++;
			}
			
			last = e;
		}
		ArrayList<E> ret = new ArrayList<>(count);

		last = null;
		for (E e : list) {
			if (last == null || !last.equals(e)) {
				ret.add(e);
			}
			
			last = e;
		}
		return ret;
	}