Trying to return Multiple Card objects from a hashmap
Currently using the following code
private HashMAp<Integer,Card> allCards = new HashMap<Integer,Card>();
public Card getAllCards()
{
Collection col = allCards.values();
for(Card c: col)
{
return c;
}
}
This works but only returns 1 Card object from many.
How can I change it to return every object stored in the HashMap??
Thankyou