|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectFinchModelAbstract
public abstract class FinchModelAbstract
Field Summary | |
---|---|
protected FinchActionList |
masterActionList
The master action list |
protected finch.Finch |
myFinch
A reference to the Finch object |
Constructor Summary | |
---|---|
FinchModelAbstract(finch.Finch myFinch)
Constructor |
Method Summary | |
---|---|
abstract void |
add(FinchAction action)
Add a FinchAction to the master action list |
abstract void |
delete(FinchAction action)
Delete the specified FinchAction from the master action list. |
abstract void |
execute(java.lang.String name,
boolean reverse)
Execute the master action list (or a subset of it). |
FinchActionList |
getFinchActionList()
Accessor to the master action list. |
abstract FinchActionList |
getFinchActionList(java.lang.String strg)
Return the subset of the master action list that matches strg |
abstract void |
loadBinary(java.io.File file,
LoadType loadType)
Load an action list from a binary file. |
abstract void |
loadText(java.io.File file)
Load a text file containing an action list. |
abstract void |
saveBinary(java.io.File file)
Write the master action list to a binary file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected finch.Finch myFinch
protected FinchActionList masterActionList
Constructor Detail |
---|
public FinchModelAbstract(finch.Finch myFinch)
myFinch
- A reference to the Finch object
Postconditions:
Method Detail |
---|
public FinchActionList getFinchActionList()
public abstract FinchActionList getFinchActionList(java.lang.String strg)
strg
- String key
public abstract void loadText(java.io.File file)
Postconditions:
file
- The name of the file to loadpublic abstract void loadBinary(java.io.File file, LoadType loadType)
Postconditions:
file
- The name of the file to loadloadType
- LOAD_FILE = replace the master list with the one loaded from the file,
UNION_FILE = combine the master list with the one loaded (removing duplicates),
INTERSECT_FILE = combine the master list with the one loaded (keeping only the same items)public abstract void saveBinary(java.io.File file)
Postconditions:
file
- The name of the file to be written.public abstract void delete(FinchAction action)
Note: equality is defined by the equality of the reference (hint: review the available LinkedList methods)
Postconditions:
action
- A FinchAction to be deletedpublic abstract void add(FinchAction action)
action
- The FinchAction to be added to the master action list.
Postconditions:
public abstract void execute(java.lang.String name, boolean reverse)
Postconditions:
name
- The action names to execute. If "all", then
execute all actions.reverse
- If true, then execute the actions in reverse order.
Note that ordering is specified by FinchAction.compareTo()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |