public interface CardComparator extends java.util.Comparator<Card>
Comparison of 2 cards based on their suits and values.
This interface is essentially an extension of
Comparator<Card>
,
Comparator<CardSuit>
,
Comparator<CardValue>
. In fact, the 2 methods
declared in this interface are those that would be
declared by the last 2 comparators.
jpleal@fc.up.pt
Modifier and Type | Method and Description |
---|---|
int |
compare(CardSuit o1,
CardSuit o2)
Compare card suits as in
Comparator |
int |
compare(CardValue o1,
CardValue o2)
Compare card values as in
Comparator |
compare, comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong