# Class Pair

java.lang.Object
com.codename1.gaming.physics.box2d.collision.broadphase.Pair

All Implemented Interfaces:
  `Comparable<Pair>`

public class Pair extends Object implements Comparable<Pair>
Java note: at the "creation" of each node, a random key is given to that node, and that's what we sort from.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `int`
  `proxyIdA`
  `int`
  `proxyIdB`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Pair()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `compareTo(Pair pair2)`
  Compares this object to the specified object to determine their relative order.

  ### Methods inherited from class Object

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

- ## Field Details

  - ### proxyIdA

    public int proxyIdA

  - ### proxyIdB

    public int proxyIdB

- ## Constructor Details

  - ### Pair

    public Pair()

- ## Method Details

  - ### compareTo

    public int compareTo(Pair pair2)
    Description copied from interface: `Comparable`

    Compares this object to the specified object to determine their relative order.

    ###### Parameters

    - `another`: the object to compare to this instance.

    ###### Returns

    Specified by:
      `compareTo` in interface `Comparable<Pair>`
    Returns:

      a negative integer if this instance is less than `another`; a positive integer if this instance is greater than `another`; 0 if this instance has the same order as `another`.

      ###### Throws

      - `ClassCastException`: @throws ClassCastException if `another` cannot be converted into something comparable to `this` instance.