|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractList
|
+--java.util.Vector
|
+--org.flashcards.CardDeck
The CardDeck class represents a deck of flash cards. It is implemented as a Vector. Flash card decks can be loaded from text files that look like this:
# Comment front 1 | back 1 # Another comment front 2 | back 2 front 3 | back 3 ...
| Field Summary | |
private java.io.File |
deckFile
|
| Fields inherited from class java.util.Vector |
capacityIncrement,
elementCount,
elementData,
serialVersionUID |
| Fields inherited from class java.util.AbstractList |
modCount |
| Constructor Summary | |
CardDeck()
Construct an empty card deck. |
|
| Method Summary | |
void |
flipAll()
Flip all cards in the deck. |
Card |
getCard(int index)
Return the card at the given index. |
java.io.File |
getFile()
Get the deck file. |
void |
load(java.io.File theFile)
Load a flash card deck from a file with the given name. |
void |
shuffle()
Shuffle the deck. |
| Methods inherited from class java.util.Vector |
add,
add,
addAll,
addAll,
addElement,
capacity,
clear,
clone,
contains,
containsAll,
copyInto,
elementAt,
elements,
ensureCapacity,
ensureCapacityHelper,
equals,
firstElement,
get,
hashCode,
indexOf,
indexOf,
insertElementAt,
isEmpty,
lastElement,
lastIndexOf,
lastIndexOf,
remove,
remove,
removeAll,
removeAllElements,
removeElement,
removeElementAt,
removeRange,
retainAll,
set,
setElementAt,
setSize,
size,
subList,
toArray,
toArray,
toString,
trimToSize |
| Methods inherited from class java.util.AbstractList |
iterator,
listIterator,
listIterator |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private java.io.File deckFile
| Constructor Detail |
public CardDeck()
| Method Detail |
public java.io.File getFile()
public Card getCard(int index)
public void load(java.io.File theFile)
throws java.io.IOException
public void shuffle()
public void flipAll()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||