@SuppressWarnings("unchecked")
	public static <T extends Number> T[][] array2DArraySorter(T[][] tab,
			int sortColumn) {
		int tabLength = tab.length;
		if (tabLength == 0)
			return tab;
		for (int i = 0; i < tabLength; ++i) {
			if (sortColumn > tab[i].length - 1)
				throw new ArrayIndexOutOfBoundsException(
						"Array sort column is too high");
		}

		T[] order = (T[]) new Number[tabLength];
		for (int i = 0; i < tabLength; ++i)
			order[i] = tab[i][sortColumn];
		Arrays.sort(order);
		T[][] out = (T[][]) new Number[tabLength][];
		for (int i = 0; i < tabLength; ++i) {
			for (int j = 0; j < tabLength; ++j) {
				if (order[i] == tab[i][sortColumn])
					out[i] = tab[i];
			}
		}

		return out;
	}