static boolean equals(final BaseSeq<?> seq, final Object obj) {
		if (obj == seq) {
			return true;
		}
		if (!(obj instanceof final Seq<?> other)) {
			return false;
		}

		boolean equals = seq.length() == other.length();
		for (int i = seq.length(); equals && --i >= 0;) {
			final Object element = seq.get(i);
			equals = element != null
				? element.equals(other.get(i))
				: other.get(i) == null;
		}
		return equals;
	}
Unified method for compare to sequences for equality.

@see Seq#equals(Object)

@param seq the sequence to test for equality.
@param obj the object to test for equality with the sequence.
@return {@code true} if the given objects are sequences and contain the
         same objects in the same order, {@code false} otherwise.
jenetics/src/main/java/io/jenetics/util/Seq.java