de.unikassel.android.sdcframework.data
Class WeekdayScheduleEntry

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

public class WeekdayScheduleEntry
extends Object
implements SerializableData, Parcelable, BroadcastableEvent

A weekday schedule entry marks a time stamp hh:mm:ss at the connected weekday and an action to perform.


Nested Class Summary
 
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.Creator<T>
 
Field Summary
private  WeekdaySchedulerAction action
          The action to perform
static Parcelable.Creator<WeekdayScheduleEntry> CREATOR
          The Parcelable creator.
private  boolean isValid
          The validation flag for display purpose.
private  int time
          The time offset in seconds (hh:mm:ss) at the related weekday.
private  WeekdaySchedule weekdaySchedule
          The associated weekday schedule.
 
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
 
Constructor Summary
WeekdayScheduleEntry(Intent intent)
          Constructor
WeekdayScheduleEntry(int startTime, WeekdaySchedulerAction action)
          Constructor
WeekdayScheduleEntry(Parcel source)
          Constructor
WeekdayScheduleEntry(WeekdayScheduleEntry source)
          Constructor
 
Method Summary
 int describeContents()
           
 boolean equals(Object o)
           
 WeekdaySchedulerAction getAction()
          Getter for the action
 Intent getIntent()
          Getter for an intent representation
 int getMilliseconds()
          Getter for the time in millisecond precision
 int getSeconds()
          Getter for the time in second precision
 Weekday getWeekday()
          Getter for the week day
 WeekdaySchedule getWeekdaySchedule()
          Getter for the day
 boolean isValid()
          Getter for the isValid
 void setAction(WeekdaySchedulerAction action)
          Setter for the action
 void setSeconds(int time)
          Setter for the time
 void setValid(boolean isValid)
          Setter for the isValid
 void setWeekdaySchedule(WeekdaySchedule weekdaySchedule)
          Setter for the weekday schedule
 String toString()
           
 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, wait, wait, wait
 

Field Detail

weekdaySchedule

private WeekdaySchedule weekdaySchedule
The associated weekday schedule.


time

private int time
The time offset in seconds (hh:mm:ss) at the related weekday.


action

private WeekdaySchedulerAction action
The action to perform


isValid

private boolean isValid
The validation flag for display purpose.


CREATOR

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

Constructor Detail

WeekdayScheduleEntry

public WeekdayScheduleEntry(Intent intent)
Constructor

Parameters:
intent - the intent to create from

WeekdayScheduleEntry

public WeekdayScheduleEntry(WeekdayScheduleEntry source)
Constructor

Parameters:
source - the source to copy from

WeekdayScheduleEntry

public WeekdayScheduleEntry(Parcel source)
Constructor

Parameters:
source - the associated weekday schedule

WeekdayScheduleEntry

public WeekdayScheduleEntry(int startTime,
                            WeekdaySchedulerAction action)
Constructor

Parameters:
startTime - the time stamp
action - the action to perform
Method Detail

getWeekdaySchedule

public WeekdaySchedule getWeekdaySchedule()
Getter for the day

Returns:
the day

getWeekday

public Weekday getWeekday()
Getter for the week day

Returns:
the week day if assigned, null otherwise

setWeekdaySchedule

public void setWeekdaySchedule(WeekdaySchedule weekdaySchedule)
Setter for the weekday schedule

Parameters:
weekdaySchedule - the weekday schedule to set

getSeconds

public int getSeconds()
Getter for the time in second precision

Returns:
the time in second precision

getMilliseconds

public int getMilliseconds()
Getter for the time in millisecond precision

Returns:
the time in millisecond precision

setSeconds

public void setSeconds(int time)
Setter for the time

Parameters:
time - the time to set

getAction

public WeekdaySchedulerAction getAction()
Getter for the action

Returns:
the action

setAction

public void setAction(WeekdaySchedulerAction action)
Setter for the action

Parameters:
action - the action to set

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

toString

public String toString()
Overrides:
toString in class Object

equals

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

setValid

public void setValid(boolean isValid)
Setter for the isValid

Parameters:
isValid - the isValid to set

isValid

public boolean isValid()
Getter for the isValid

Returns:
the isValid

describeContents

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

writeToParcel

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

getIntent

public Intent getIntent()
Description copied from interface: BroadcastableEvent
Getter for an intent representation

Specified by:
getIntent in interface BroadcastableEvent
Returns:
the Intent representation of this LogEvent