public int compare(SearchNode object1, SearchNode object2)
    {
        float f1 = ((HeuristicSearchNode) object1).getF();
        float f2 = ((HeuristicSearchNode) object2).getF();

        return (f1 > f2) ? 1 : ((f1 < f2) ? -1 : 0);
    }
public int compare(SearchNode object1, SearchNode object2)
    {
        float f1 = ((HeuristicSearchNode) object1).getF();
        float f2 = ((HeuristicSearchNode) object2).getF();

        return (f1 > f2) ? 1 : ((f1 < f2) ? -1 : 0);
    }
public int compare ( SearchNode object1 , SearchNode object2 ) { float f1 = ( ( HeuristicSearchNode ) object1 ) . getF ( ) ; float f2 = ( ( HeuristicSearchNode ) object2 ) . getF ( ) ; return ( f1 > f2 ) ? 1 : ( ( f1 < f2 ) ? - 1 : 0 ) ; }
Compares two heuristic search nodes by their f values.

@param  object1 The first heuristic search node to compare.
@param  object2 The second heuristic search node to compare.

@return 1 If the first node has a higher f value than the second, 0 if they have the same f value, -1 if the
second has a higher f value than the first.
Compares two heuristic search nodes by their f values .