Package org.codehaus.groovy.runtime

# Class AbstractComparator<T>

java.lang.Object
org.codehaus.groovy.runtime.AbstractComparator<T>

All Implemented Interfaces:
  `Comparator<T>`

public abstract class AbstractComparator<T> extends Object implements Comparator<T>
Base class for Groovy comparators. Provides a common implementation where equality is based on object identity.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AbstractComparator()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object obj)`
  Tests for equality based on object identity.

  ### Methods inherited from class java.lang.Object

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

  ### Methods inherited from interface java.util.Comparator

  `compare, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong`

- ## Constructor Details

  - ### AbstractComparator

    public AbstractComparator()

- ## Method Details

  - ### equals

    public boolean equals(Object obj)
    Tests for equality based on object identity.
    Specified by:
      `equals` in interface `Comparator<T>`
    Overrides:
      `equals` in class `Object`
    Parameters:
      `obj` - the object to compare with
    Returns:
      `true` if this object is the same as the specified object