AbsoluteOrder.AbsoluteComparator (Apache Tomcat 11.0.24 API Documentation)
Description: declaration: package: org.apache.catalina.tribes.group, class: AbsoluteOrder, class: AbsoluteComparator

# Class AbsoluteOrder.AbsoluteComparator

java.lang.Object
org.apache.catalina.tribes.group.AbsoluteOrder.AbsoluteComparator

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

Enclosing class:
  `AbsoluteOrder`

public static class AbsoluteOrder.AbsoluteComparator extends Object implements Comparator<Member>, Serializable
A comparator for absolute ordering of members.

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AbsoluteComparator()`
  Default constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `compare(Member m1, Member m2)`
  `protected int`
  `compareBytes(byte[] d1, byte[] d2)`
  Compare two byte arrays.
  `protected int`
  `compareBytes(byte b1, byte b2)`
  Compare two bytes.
  `int`
  `compareIds(Member m1, Member m2)`
  Compare the unique IDs of two members.
  `protected int`
  `compareInts(int b1, int b2)`
  Compare two integers.
  `int`
  `compareIps(Member m1, Member m2)`
  Compare the IP addresses of two members.
  `int`
  `comparePorts(Member m1, Member m2)`
  Compare the ports of two members.

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

  - ### AbsoluteComparator

    public AbsoluteComparator()
    Default constructor.

- ## Method Details

  - ### compare

    public int compare(Member m1, Member m2)
    Specified by:
      `compare` in interface `Comparator<Member>`

  - ### compareIps

    public int compareIps(Member m1, Member m2)
    Compare the IP addresses of two members.
    Parameters:
      `m1` - First member
      `m2` - Second member
    Returns:
      comparison result

  - ### comparePorts

    public int comparePorts(Member m1, Member m2)
    Compare the ports of two members.
    Parameters:
      `m1` - First member
      `m2` - Second member
    Returns:
      comparison result

  - ### compareIds

    public int compareIds(Member m1, Member m2)
    Compare the unique IDs of two members.
    Parameters:
      `m1` - First member
      `m2` - Second member
    Returns:
      comparison result

  - ### compareBytes

    protected int compareBytes(byte[] d1, byte[] d2)
    Compare two byte arrays.
    Parameters:
      `d1` - First byte array
      `d2` - Second byte array
    Returns:
      comparison result

  - ### compareBytes

    protected int compareBytes(byte b1, byte b2)
    Compare two bytes.
    Parameters:
      `b1` - First byte
      `b2` - Second byte
    Returns:
      comparison result

  - ### compareInts

    protected int compareInts(int b1, int b2)
    Compare two integers.
    Parameters:
      `b1` - First integer
      `b2` - Second integer
    Returns:
      comparison result