public static <T extends Comparable<T>> int compareInOrder(Collection<T> a, Collection<T> b) {
		int result;
		result = a.size() - b.size();
		if (result != 0) {
			return result;
		}
		Iterator<T> ita = a.iterator();
		Iterator<T> itb = b.iterator();
		while (ita.hasNext()) {
			result = ita.next().compareTo(itb.next());
			if (result != 0) {
				return result;
			}
		}
		return 0;
	}
Compare two collections by their corresponding elements in order

<p>
If the collections have differing sizes, the ordering does not matter. The smaller collection
precedes the larger. Otherwise, each corresponding pair of elements are compared. Once an
unequal pair is found, the collections are ordered by those elements. This is analogous to
{@link String} comparison.

@param a the first set
@param b the second set
@return a comparison result as in {@link Comparable#compareTo(Object)}
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/app/plugin/assembler/sleigh/util/AsmUtil.java