Package htsjdk.samtools.util

# Class IntervalCoordinateComparator

java.lang.Object
htsjdk.samtools.util.IntervalCoordinateComparator

All Implemented Interfaces:
  `Serializable`, `Comparator<Interval>`

public class IntervalCoordinateComparator extends Object implements Comparator<Interval>, Serializable
Comparator that orders intervals based on their sequence index, by coordinate then by strand and finally by name.

See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`IntervalCoordinateComparator(SAMFileHeader header)`
Constructs a comparator using the supplied sequence header.

## Method Summary

Modifier and Type
Method
Description
`int`
`compare(Interval lhs, Interval rhs)`

### 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 Details

### IntervalCoordinateComparator

public IntervalCoordinateComparator(SAMFileHeader header)
Constructs a comparator using the supplied sequence header.

## Method Details

### compare

public int compare(Interval lhs, Interval rhs)

Specified by:
  `compare` in interface `Comparator<Interval>`