public int compare ( T a , T b ) { boolean aRb = partialOrdering . evaluate ( a , b ) ; if ( ! aRb ) { return - 1 ; } boolean bRa = partialOrdering . evaluate ( b , a ) ; return ( aRb && bRa ) ? 0 : 1 ; }
Translates the partial order into the + 1 0 - 1 convention needed by Comparators .