public enum Ranking extends Enum<Ranking> implements Predicate<List<Card>>
| Enum Constant and Description |
|---|
Empty |
FiveOfAKind |
Flush |
FourOfAKind |
FullHouse |
HighCard |
Pair |
RoyalFlush |
Straight |
StraightFlush |
ThreeOfAKind |
TwoPair |
| Modifier and Type | Field and Description |
|---|---|
static Comparator<Ranking> |
COMPARATOR
Comparator that orders Rankings weakest to
strongest. |
| Modifier and Type | Method and Description |
|---|---|
List<Card> |
find(Collection<Card> collection)
|
Predicate<List<Card>> |
possible()
|
int |
required()
|
boolean |
test(List<Card> list) |
static Ranking |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Ranking[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Ranking ThreeOfAKind
public static final Ranking FourOfAKind
public static final Ranking StraightFlush
public static final Ranking RoyalFlush
public static final Ranking FiveOfAKind
public static Comparator<Ranking> COMPARATOR
Comparator that orders Rankings weakest to
strongest.public static Ranking[] values()
for (Ranking c : Ranking.values()) System.out.println(c);
public static Ranking valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic List<Card> find(Collection<Card> collection)
Copyright © 2015–2020 Allen D. Ball. All rights reserved.