de.unikassel.android.sdcframework.data
Class WeekdaySchedule

Package class diagram package WeekdaySchedule
java.lang.Object
  extended by de.unikassel.android.sdcframework.data.WeekdaySchedule
All Implemented Interfaces:
Parcelable, SerializableData

public class WeekdaySchedule
extends Object
implements SerializableData, Parcelable

Weekday schedule representation.


Nested Class Summary
 
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.Creator<T>
 
Field Summary
static Parcelable.Creator<WeekdaySchedule> CREATOR
          The Parcelable creator.
private  List<WeekdayScheduleEntry> scheduleEntryList
          The list with the weekday schedule entries.
private  Weekday weekday
          The associated weekday.
 
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
 
Constructor Summary
WeekdaySchedule(Parcel source)
          Constructor
WeekdaySchedule(Weekday weekday)
          Constructor
WeekdaySchedule(Weekday weekday, List<WeekdayScheduleEntry> scheduleEntryList)
          Constructor
 
Method Summary
 void addEntry(WeekdayScheduleEntry entry)
          Method to add entries.
 int describeContents()
           
 boolean equals(Object o)
           
 List<WeekdayScheduleEntry> getEntries()
          Getter for the weekday schedule entries.
 Weekday getWeekday()
          Getter for the weekday
 boolean isValid()
          Test method for a valid weekday schedule.
 void removeEntry(WeekdayScheduleEntry entry)
          Method to remove entries.
 String toXML()
          Serialization from the type to it's XML representation
 void writeToParcel(Parcel dest, int flags)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

weekday

private final Weekday weekday
The associated weekday.


scheduleEntryList

private final List<WeekdayScheduleEntry> scheduleEntryList
The list with the weekday schedule entries.


CREATOR

public static final Parcelable.Creator<WeekdaySchedule> CREATOR
The Parcelable creator.

Constructor Detail

WeekdaySchedule

public WeekdaySchedule(Parcel source)
Constructor

Parameters:
source - the associated weekday schedule

WeekdaySchedule

public WeekdaySchedule(Weekday weekday,
                       List<WeekdayScheduleEntry> scheduleEntryList)
Constructor

Parameters:
weekday - the weekday
scheduleEntryList - the scheduled entries for this weekday

WeekdaySchedule

public WeekdaySchedule(Weekday weekday)
Constructor

Parameters:
weekday - the weekday
Method Detail

getWeekday

public Weekday getWeekday()
Getter for the weekday

Returns:
the weekday

addEntry

public void addEntry(WeekdayScheduleEntry entry)
Method to add entries.

Parameters:
entry - the schedule entry to add

removeEntry

public void removeEntry(WeekdayScheduleEntry entry)
Method to remove entries.

Parameters:
entry - the schedule entry to remove

getEntries

public List<WeekdayScheduleEntry> getEntries()
Getter for the weekday schedule entries.

Returns:
the weekday schedule entries

toXML

public String toXML()
             throws Exception
Description copied from interface: SerializableData
Serialization from the type to it's XML representation

Specified by:
toXML in interface SerializableData
Returns:
the XML representation of the type if successful, null otherwise
Throws:
Exception - if the schema for the object is not valid

equals

public boolean equals(Object o)
Overrides:
equals in class Object

isValid

public boolean isValid()
Test method for a valid weekday schedule.

Returns:
true if valid, false otherwise.

describeContents

public int describeContents()
Specified by:
describeContents in interface Parcelable

writeToParcel

public void writeToParcel(Parcel dest,
                          int flags)
Specified by:
writeToParcel in interface Parcelable