@SuppressWarnings("unchecked")
	public static <T> T[] arrayOfArraysSorter(T[] tab, int sortColumn) {
		int tabLength = tab.length;
		if (tabLength == 0)
			return tab;
		for (int i = 0; i < tabLength; ++i) {
			if (!tab[i].getClass().isArray())
				throw new IllegalArgumentException(
						"Array does not contain Arrays");
			if (sortColumn > ((Object[]) tab[i]).length - 1)
				throw new ArrayIndexOutOfBoundsException(
						"Array sort column is too high");
			if (!Number.class.isAssignableFrom(((Object[]) tab[i])[sortColumn]
					.getClass()))
				throw new IllegalArgumentException(
						"Sort colum does not contain Number");
		}

		Integer[] order = new Integer[tabLength];
		for (int i = 0; i < tabLength; ++i)
			order[i] = ((Number) ((Object[]) tab[i])[sortColumn]).intValue();
		Arrays.sort(order);
		T[] out = (T[]) new Object[tabLength];
		for (int i = 0; i < tabLength; ++i) {
			for (int j = 0; j < tabLength; ++j) {
				System.out.println(order[i] + " - "
						+ ((Object[]) tab[i])[sortColumn]);
				if (order[i] == ((Object[]) tab[i])[sortColumn]) {
					out[i] = tab[i];
				}
			}
		}

		return out;
	}