Package htsjdk.samtools
Class SAMHeaderRecordComparator<T extends AbstractSAMHeaderRecord>
- java.lang.Object
-
- htsjdk.samtools.SAMHeaderRecordComparator<T>
-
- All Implemented Interfaces:
Serializable
,Comparator<T>
public class SAMHeaderRecordComparator<T extends AbstractSAMHeaderRecord> extends Object implements Comparator<T>, Serializable
Provides ordering based on SAM header records' attribute values. Provide the list of attributes to use in the comparison to the constructor. Null attribute values (i.e., those attributes not present in the record) sort behind those that have values.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SAMHeaderRecordComparator(String... attributes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(T left, T right)
-
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
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Constructor Detail
-
SAMHeaderRecordComparator
public SAMHeaderRecordComparator(String... attributes)
-
-
Method Detail
-
compare
public int compare(T left, T right)
- Specified by:
compare
in interfaceComparator<T extends AbstractSAMHeaderRecord>
-
-