net.sourceforge.pmd

## Class RuleViolationComparator

- java.lang.Object
- - net.sourceforge.pmd.RuleViolationComparator

All Implemented Interfaces:
  Comparator<RuleViolation>

    public final class RuleViolationComparator
    extends Object
    implements Comparator<RuleViolation>

Compares RuleViolations using the following criteria:

1. Source file name
2. Begin line
3. Description
4. Begin column
5. End line
6. End column
7. Rule name

### Field Summary

Fields
`static RuleViolationComparator` `INSTANCE`

### Method Summary

Methods
`int` `compare(RuleViolation r1, RuleViolation r2)`

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

### Field Detail

#### INSTANCE

    public static final RuleViolationComparator INSTANCE

### Method Detail

#### compare

    public int compare(RuleViolation r1,
              RuleViolation r2)

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