Structure your evaluation function like this:
1) First, determine what type of hand it is (highest card, pair, two pair... royal flush). The hand type should be an enumeration ordered from worst to best.
2) Second, sort the cards in the hand - the cards that made up the hand type should go first (in particular, for a full house the three of a kind should go first before the two of the kind), then sort all remaining cards from best to worst.
3) Tuple the hand type and the sorted cards - this is the evaluation of how good the hand is.
Structure your comparison function like this:
1) First, compare the hand types. If one is higher, that hand is better.
2) Else, compare the first cards from the sorted hands. If one is higher, that hand is better.
3) Keep doing 2) on each card.
Now you can use your comparator to, for example, sort any number of hands into order from worst to best hand.
You could also create a score for each hand, and then just compare the integers - for example, worst (in the sense of least significant) card + second worst card*11 + third card*11^2 + fourth card*11^3 + best card*11^4 + hand type*11^5