com.jscape.inet.dns.record

## Class MailExchangerComparator

- java.lang.Object
- - com.jscape.inet.dns.record.MailExchangerComparator

- All Implemented Interfaces:
    java.util.Comparator

      public class MailExchangerComparator
      extends java.lang.Object
      implements java.util.Comparator

  Implements methods for sorting MailExchanger records by preference.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MailExchangerComparator()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compare(java.lang.Object obj1, java.lang.Object obj2)` Compares preference of two (2) MailExchanger instances.

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

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

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

      `comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong`

- - ### Constructor Detail

    - #### MailExchangerComparator

          public MailExchangerComparator()

  - ### Method Detail

    - #### compare

          public int compare(java.lang.Object obj1,
                             java.lang.Object obj2)

      Compares preference of two (2) MailExchanger instances.
      Specified by:
        `compare` in interface `java.util.Comparator`
      Parameters:
        `obj1` - a `MailExchanger`
        `obj2` - a `MailExchanger`
      Returns:
        -1 if obj1 < obj2, 1 if obj1 > obj2, 0 if equal
      See Also:
        `MailExchanger`

Copyright © JSCAPE LLC. 1999-2021. All Rights Reserved