|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjagafa.object.CardList
public class CardList
Object to store a list of Card Objects Attention: Does not implement java.util.List
| Constructor Summary | |
|---|---|
CardList()
Constructor: Init the list |
|
| Method Summary | |
|---|---|
void |
add(Card c)
Add a card to the CardList |
void |
addAll(CardList list)
Adds all Card from the CardList given to the CardList |
void |
clear()
Clear the CardList |
boolean |
contains(Card c)
Checks wether the CardList contains the Card given |
Card |
get(int i)
Get a card out of the CardList at a position specified |
CardList |
getGoneOfColor(int i)
Dummy method: Used in GoneCardHeap only |
boolean |
isEmpty()
Checks wether the CardList is empty or not |
java.util.Iterator<Card> |
iterator()
Converts the CardList to a java.util.iterator object |
java.util.List<Card> |
list()
Convert the CardList to a java.util.list object |
void |
remove(Card c)
Remove a card from the CardList |
void |
remove(int i)
Remove a card from the CardList |
int |
size()
Get the number of cards in the CardList |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CardList()
| Method Detail |
|---|
public void add(Card c)
c - The card to addpublic void remove(Card c)
c - The card to removepublic void remove(int i)
i - The cards positionpublic Card get(int i)
i - The position
public java.util.Iterator<Card> iterator()
public int size()
public boolean isEmpty()
public boolean contains(Card c)
c - The card
public void clear()
public java.util.List<Card> list()
public void addAll(CardList list)
list - The CardList to addpublic java.lang.String toString()
toString in class java.lang.Objectpublic CardList getGoneOfColor(int i)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||