Package org.eclipse.viatra.query.runtime.rete.network.communication

## Class NodeComparator

- java.lang.Object
- - org.eclipse.viatra.query.runtime.rete.network.communication.NodeComparator

- All Implemented Interfaces:
    `java.util.Comparator<Node>`

      public class NodeComparator
      extends java.lang.Object
      implements java.util.Comparator<Node>

  Since:
    2.4

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected java.util.Map<Node,​java.lang.Integer>` | `nodeMap` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `NodeComparator​(java.util.Map<Node,​java.lang.Integer> nodeMap)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | `compare​(Node left, Node right)` |

    - ### 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, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong`

- - ### Field Detail

    - #### nodeMap

          protected final java.util.Map<Node,​java.lang.Integer> nodeMap

  - ### Constructor Detail

    - #### NodeComparator

          public NodeComparator​(java.util.Map<Node,​java.lang.Integer> nodeMap)

  - ### Method Detail

    - #### compare

          public int compare​(Node left,
                             Node right)

      Specified by:
        `compare` in interface `java.util.Comparator<Node>`