|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Observable
scheduler.db.preferencesdb.PreferencesDB
public class PreferencesDB
The class representing the preferences database.
Field Summary | |
---|---|
protected java.util.Collection<Preferences> |
data
Collection of preferences. |
Constructor Summary | |
---|---|
PreferencesDB()
Default Constructor |
Method Summary | |
---|---|
void |
addPreference(Preferences p)
Adds a Preference to the database |
java.util.Collection<Preferences> |
getData()
Returns the preference database as a collection |
Preferences |
getPreferences(java.lang.String name)
Iterates through the PreferencesDB to return correct one |
void |
removePreference(Preferences p)
Removes a Preference from the Preferences Database |
void |
setData(java.util.Collection<Preferences> data)
Sets the data in the PreferencesDB |
Methods inherited from class java.util.Observable |
---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Collection<Preferences> data
Constructor Detail |
---|
public PreferencesDB()
Method Detail |
---|
public void addPreference(Preferences p)
p
- Preference Object
// ** Pre and Post conditions ** // Pre: // Preference can not be Null p != nil && // Preference can not be in PreferencesDB !(PreferencesDB.contains(p)) Post: //Preference must be stored into database PreferencesDB.contains(p)
public void removePreference(Preferences p)
p
- Preference Object
// ** Pre and Post conditions ** // Pre: // Preference can not be Null p != nil && //Preference must be in the Preferences Database PreferencesDB.contains(p) Post: // Preference can not be in PreferencesDB !(PreferencesDB.contains(p))
public java.util.Collection<Preferences> getData()
// ** Pre and Post conditions ** // Pre: // Collectioncannot be null data != nil Post: //Return data must match the current PreferencesDB data = PreferencesDB.data
public void setData(java.util.Collection<Preferences> data)
data
- Collection// ** Pre and Post conditions ** // Pre: // data cannot be null data != nil Post: // PreferencesDB data must equal the passed data PreferencesDB.data = data
public Preferences getPreferences(java.lang.String name)
name
- String containing name of preference to return
// ** Pre and Post conditions ** // Pre: // name cannot be null name != nil Post: // Name of returned preference matches the name parameter p.name = name
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |