base/common/src/main/com/thesett/common/util/FibonacciHeap.java
private int compare(Node node1, Node node2)
    {
        // Check if a comparator was set.
        if (entryComparator != null)
        {
            // Use the comparator to compare.
            return entryComparator.compare(node1.element, node2.element);
        }

        // No comparator was set so use the natural ordering.
        else
        {
            // Cast one of the elements into a Comparable and compare it with the other.
            return ((Comparable) node1.element).compareTo(node2.element);
        }
    }
private int compare(Node node1, Node node2)
    {
        // Check if a comparator was set.
        if (entryComparator != null)
        {
            // Use the comparator to compare.
            return entryComparator.compare(node1.element, node2.element);
        }

        // No comparator was set so use the natural ordering.
        else
        {
            // Cast one of the elements into a Comparable and compare it with the other.
            return ((Comparable) node1.element).compareTo(node2.element);
        }
    }
private int compare ( Node node1 , Node node2 ) { // Check if a comparator was set. if ( entryComparator != null ) { // Use the comparator to compare. return entryComparator . compare ( node1 . element , node2 . element ) ; } // No comparator was set so use the natural ordering. else { // Cast one of the elements into a Comparable and compare it with the other. return ( ( Comparable ) node1 . element ) . compareTo ( node2 . element ) ; } }
Compares two heap nodes. The comparison performed is dependant on whether a comparator has been set or the
natural ordering is to be used.

@param  node1 The first node to compare.
@param  node2 The second node to compare.

@return a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than
the specified object.
Compares two heap nodes . The comparison performed is dependant on whether a comparator has been set or the natural ordering is to be used .