@SuppressWarnings("unchecked")
	default boolean isSorted() {
		boolean sorted = true;
		for (int i = 0, n = length() - 1; i < n && sorted; ++i) {
			sorted = ((Comparable<T>)get(i)).compareTo(get(i + 1)) <= 0;
		}

		return sorted;
	}
Test whether the given array is sorted in ascending order.

@return {@code true} if the given {@code array} is sorted in ascending
        order, {@code false} otherwise.
@throws NullPointerException if the given array or one of its element is
        {@code null}.
jenetics/src/main/java/io/jenetics/util/Seq.java