All Implemented Interfaces:
SAMRecordComparator, java.io.Serializable, java.util.Comparator< SAMRecord>
SAMRecord comparator that provides an ordering based on a hash of the queryname. Has
the useful property that reads with the same name will be grouped together, but that
reads appear in an otherwise random order. Useful for when the read names in a BAM
are correlated to something else (e.g. position, read group), making a straight
queryname sort undesirable.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public int compare(
Compares two records based on an integer hash of their read name's. If the hash
values are equal, falls back to the behaviour of SAMRecordQueryNameComparator
to break the tie.
compare in interface