x86Cow / javaBlackjack

Concrete collection type used in method declaration JAVA-W1065
Anti-pattern
Major
a year agoa year old
Method getHand returns an instance of a concrete collection type
28    public void setBet(int amount) {
29        betAmount = amount;
30    }
31    public ArrayList<Card> getHand() {32        return hand;33    }34    public void clearHand() {
35        hand.clear();
36    }
Method getDeck returns an instance of a concrete collection type
15    public void shuffle() {
16        Collections.shuffle(cards);
17    }
18    public ArrayList<Card> getDeck() {19        return cards;20    }21    /**
22     * Gets specifed card based off of index
23     * @param cardIndex