Package ball.game.card.poker
Class Evaluator
- java.lang.Object
-
- ball.game.card.poker.Evaluator
-
-
Field Summary
Fields Modifier and Type Field Description static Comparator<Card>CARDstatic Comparator<List<Card>>HAND
-
Constructor Summary
Constructors Modifier Constructor Description Evaluator(Collection<Card> collection)Sole public constructor.protectedEvaluator(Collection<Card> collection, Ranking... rankings)Protected constructor to search for specificRanking(s).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(List<Card> list)List<Card>getHand()RankinggetRanking()Method to get this hand'sRanking.List<Card>getScoring()booleantest(List<Card> prefix)StringtoString()
-
-
-
Field Detail
-
CARD
public static final Comparator<Card> CARD
-
HAND
public static final Comparator<List<Card>> HAND
-
-
Constructor Detail
-
Evaluator
public Evaluator(Collection<Card> collection)
Sole public constructor.- Parameters:
collection- TheCollectionofCards to evaluate.
-
Evaluator
protected Evaluator(Collection<Card> collection, Ranking... rankings)
Protected constructor to search for specificRanking(s).- Parameters:
collection- TheCollectionofCards to evaluate.rankings- TheRankings to look for.
-
-
Method Detail
-
getRanking
public Ranking getRanking()
Method to get this hand'sRanking.- Returns:
- The
Ranking.
-
getScoring
public List<Card> getScoring()
-
-