# Class LocusComparator<T extends Locus>

java.lang.Object
htsjdk.samtools.util.LocusComparator<T>

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

public class LocusComparator<T extends Locus> extends Object implements Comparator<T>, Serializable
compares first by sequence index then by position

See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`LocusComparator()`

## Method Summary

Modifier and Type
Method
Description
`int`
`compare(T thing1, T thing2)`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface Comparator

`equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong`

## Constructor Details

### LocusComparator

public LocusComparator()

## Method Details

### compare

public int compare(T thing1, T thing2)

Specified by:
  `compare` in interface `Comparator<T extends Locus>`