@Override
	@SuppressWarnings({"rawtypes", "unchecked"})
	default int compareTo(final Path<T> other) {
		for (int i = 0, n = Math.min(count(), other.count()); i < n; ++i) {
			final var e1 = (Comparable)get(i).element();
			final var e2 = (Comparable)other.get(i).element();

			int cmp = e1.compareTo(e2);
			if (cmp != 0) {
				return cmp;
			}
		}

		return Integer.compare(count(), other.count());
	}
Appends the given {@code elements} to {@code this} and returns a new
path object.

@param elements the paths to append to {@code this} path
@return a new path object
jenetics.incubator/src/main/java/io/jenetics/incubator/util/Path.java