|
TV-Browser 3.3.3 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object tvdataservice.MutableChannelDayProgram
public class MutableChannelDayProgram
A list of the programs of one channel and one day.
This implementation is mutable, meaning you can add programs. These programs are automatically sorted by time.
Constructor Summary | |
---|---|
MutableChannelDayProgram(Date date,
Channel channel)
Creates a new instance of MutableChannelDayProgram. |
Method Summary | |
---|---|
void |
addProgram(Program program)
Adds a program. |
boolean |
equals(ChannelDayProgram dayProgram)
Compare with the given dayProgram |
boolean |
getAndResetChangedByPluginState()
Get if the day program was changed by a plugin and reset the changed state. |
Channel |
getChannel()
Returns the channel of this day program. |
Date |
getDate()
Returns the date of this day program. |
boolean |
getLastProgramHadEndOnUpdate()
Gets the last program end time state on data update. |
Program |
getProgram(java.lang.String progID)
Returns the first program object having the specified ID. |
Program |
getProgramAt(int index)
Returns the program at the specified index. |
int |
getProgramCount()
Gets the number of programs in this list. |
java.util.Iterator<Program> |
getPrograms()
Returns an iterator containing all programs. |
Program[] |
getPrograms(java.lang.String progID)
Returns all program objects having the specified ID. |
boolean |
isComplete()
Returns whether this channel day program is complete. |
void |
removeAllPrograms()
Removes all programs from this day program. |
void |
setLastProgramHadEndOnUpdate(boolean value)
Sets the last program end time state on data update. |
void |
setWasChangedByPlugin()
Sets the changed state to let the day program be saved again to take over the changes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MutableChannelDayProgram(Date date, Channel channel)
date
- The datechannel
- The channelMethod Detail |
---|
public Channel getChannel()
getChannel
in interface ChannelDayProgram
public Date getDate()
getDate
in interface ChannelDayProgram
public Program getProgram(java.lang.String progID)
ChannelDayProgram
getProgram
in interface ChannelDayProgram
progID
- The ID of the wanted program.
public Program[] getPrograms(java.lang.String progID)
ChannelDayProgram
getPrograms
in interface ChannelDayProgram
progID
- The ID of the wanted programs.
public int getProgramCount()
getProgramCount
in interface ChannelDayProgram
public Program getProgramAt(int index)
getProgramAt
in interface ChannelDayProgram
index
- The index of the wanted program.
public void addProgram(Program program)
program
- The program to add. This program will automatically be put
in the right position in the list, so the list stays ordered.public void removeAllPrograms()
public java.util.Iterator<Program> getPrograms()
getPrograms
in interface ChannelDayProgram
public boolean isComplete()
Return true if the last program ends after midnight. Future implementations may check for gaps too.
isComplete
in interface ChannelDayProgram
public void setLastProgramHadEndOnUpdate(boolean value)
value
- the last program end time on data updatepublic boolean getLastProgramHadEndOnUpdate()
getLastProgramHadEndOnUpdate
in interface ChannelDayProgram
public void setWasChangedByPlugin()
public boolean getAndResetChangedByPluginState()
public boolean equals(ChannelDayProgram dayProgram)
dayProgram
-
true
, if all programs of the day match (with each field)
|
TV-Browser 3.3.3 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |