各位大大们好,我是JAVA新手,现在在做一个简单的扑克游戏的练习,类似升级,但不需要大小王.我在定义基础类时出了问题.我定义的基础类有:Value,Suit,Card,Pack,Pile. 
   Value是放牌的点数,从A到K
   Suit是放四个花色
   Card是生成单张牌
   Pack是生成整副牌,除了大小王
   Pile是玩家手里的牌我现在遇到的问题是,如何生成一副不重复的牌?我开始是用ArrayList作为Pack的容器,但不知道如何确保这一副牌里不重复,后来查了下API文档,发现HashSet是可以保证集合内的元素唯一性,但好像用在这里不太对.我也想过笨方法,就是把这52张牌分别定义在一个集合里,不过好像就有违面对对象的概念.现在是在是不知道该怎么办了.麻烦各位指点一下.下面附我的源码,应该比较垃圾,麻烦大家顺便也给指点下.public enum Value {

/**
 * Defines all the value for the cards
 */
TWO ("2"),
THREE ("3"),
FOUR ("4"),
FIVE ("5"),
SIX ("6"),
SEVEN ("7"),
EIGHT ("8"),
NINE ("9"),
TEN ("10"),
JACK ("J"),
QUEEN ("Q"),
KING ("K"),
ACE ("A");

/*
 * Defines the field of Class Value
 */
private String value;

/*
 * Defines the constructor of Class Value
 */
private Value(String value) {
this.value = value;
}

        public String getValue() {
                return value:
        }

/**
 * @return returns the name of this value
 */
public String toString() {
return value;
}}
public enum Suit {

/**
 * Defines all the suits for the cards
 */
SPADES("Spades"), 
HEARTS("Hearts"), 
CLUBS("Clubs"), 
DIAMONDS("Diamonds");

/**
 * Defines the field of the Class Suit
 */
    private String suit;
    
    /**
     * Defines the constructor of the Class Suit
     * @param suit
     */
    private Suit(String suit) {
     this.suit = suit;
    }
    
    public String getSuit() {
     return suit;
    }
    
    /**
     * @return returns the name of this suit
     */
    public String toString() {
     return suit;
    }}
public class Card {

/**
 * Defines the field of the Class Card
 */
private Suit suit;
private Value value;

/**
 * Defines the constructor of Class Card
 * @param suit the instance suit of the card
 * @param value the instance value of the card
 */
public Card(Suit suit, Value value) {
this.suit = suit;
this.value = value;
}

/**
 * 
 * @return
 */
public Suit getSuit() {
return suit;
}

/**
 * 
 * @return
 */
public Value getValue() {
return value;
}

}
public class Pack {

/**
 * Defines the field of Class Pack
 */
private ArrayList<Card> pack;
private int index;

/**
 * Defines the constructor of Class Pack
 */
public Pack() {
pack = new ArrayList<Card>();
index = 0;
}

public void addCard(Card card) {
for(int i=0; i<52; i++) {
     pack.add(card);
          }
}

    
/**
 *  Shuffle the cards in the pack
 */
public void shuffle() {
Collections.shuffle( pack );

/**
 * Get the number of cards in the pack
 * @return the number of cards in the pack
 */
public int getSizeOfPack() {
      return pack.size();
   }
   
/**
 * Deal a card from pack to pile
 * @return the card to be dealt, or no card to be dealt
 */
public Card dealCard() {
      if ( index >= pack.size() )
         return null;
      else
         return (Card) pack.get( index++ );
   }
   
/**
 * See the pack is empty
 * @return true: empty
 */
public boolean isEmpty() {
      if ( index >= pack.size() )
         return true;
      else
         return false;
   }
   
/**
 * Restore the pack the full pack status
 */
public void restorePack() { 
index = 0;
}
}