|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectscheduler.db.preferencesdb.Preferences
public class Preferences
This class will contain the data and operations to work with schedule Preferences
| Field Summary | |
|---|---|
(package private) java.lang.String |
data
The data contained in the preference |
(package private) int |
importance
Value to store the importance value of the preference |
(package private) java.lang.String |
name
The name of the preference |
(package private) int |
type
The type of the preference |
(package private) int |
violatable
Value to store if preference can be violated |
| Constructor Summary | |
|---|---|
Preferences()
Constructor to build a empty Preference |
|
Preferences(java.lang.String name,
java.lang.String data,
int type,
int importance,
int violatable)
Constructor to build a Preference |
|
| Method Summary | |
|---|---|
java.lang.String |
getData()
Returns the data of a preference |
int |
getImportance()
Returns the importance of a preference |
java.lang.String |
getName()
Returns the name of the preference |
int |
getType()
Returns a int representing the type of the preference |
int |
getViolatable()
Returns the value of violatable |
boolean |
isValid()
Returns a boolean based on if the Preference has valid data |
java.lang.String |
toString()
Returns a string representation of the Preference which is currently just the name |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
int type
java.lang.String name
java.lang.String data
int violatable
int importance
| Constructor Detail |
|---|
public Preferences()
public Preferences(java.lang.String name,
java.lang.String data,
int type,
int importance,
int violatable)
name - String that holds the name of preferencedata - String that holds the data of preferencetype - int that holds the type of preferenceimportance - int that holds the importance value of a preferenceviolatable - int that holds value of if a preference is violatable| Method Detail |
|---|
public java.lang.String getName()
public java.lang.String getData()
public int getType()
// ** Pre and Post conditions ** // Pre: // Preference cannot be null p != nil Post: // The type must be 1,2,3 or 4 type == 1 | type == 2 | type == 3 | type == 4 && // The return type must equal the preference type getType() = p.type
public int getViolatable()
public int getImportance()
public java.lang.String toString()
toString in class java.lang.Object// ** Pre and Post conditions ** // Pre: // Preference.name cannot be null p.name != nil Post: // The Preference must not have changed p = p' && // The return value must equal the Preference string toString() = p.name
public boolean isValid()
// ** Pre and Post conditions ** // Pre: // Preference cannot be null p != nil Post: // The Preference must not have changed p = p'
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||