TV-Browser 3.3.3 API

devplugin
Class ProgramItem

java.lang.Object
  extended by devplugin.ProgramItem
All Implemented Interfaces:
java.lang.Comparable<ProgramItem>

public class ProgramItem
extends java.lang.Object
implements java.lang.Comparable<ProgramItem>

A wrapper class for programs to add properties to the program.


Constructor Summary
ProgramItem()
           
ProgramItem(Program prog)
           
 
Method Summary
 int compareTo(ProgramItem other)
           
 Date getDate()
          Get the date of the program.
 Program getProgram()
           
 java.lang.String getProperty(java.lang.String key)
           
 int getStartTime()
          get the start time of the program in minutes after midnight
 void read(java.io.ObjectInputStream in)
          read the object from the input stream.
 void setProgram(Program prog)
           
 void setProperty(java.lang.String key, java.lang.String value)
           
 java.lang.String toString()
           
 void write(java.io.ObjectOutputStream out)
          write this object to the stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProgramItem

public ProgramItem(Program prog)

ProgramItem

public ProgramItem()
Method Detail

read

public void read(java.io.ObjectInputStream in)
          throws java.io.IOException,
                 java.lang.ClassNotFoundException
read the object from the input stream.

Parameters:
in - the stream to read from
Throws:
java.io.IOException - if something went wrong reading the stream
java.lang.ClassNotFoundException - if the object could not be deserialized

write

public void write(java.io.ObjectOutputStream out)
           throws java.io.IOException
write this object to the stream.

Parameters:
out - the stream to write to
Throws:
java.io.IOException - if something went wrong

setProgram

public void setProgram(Program prog)

getProgram

public Program getProgram()

setProperty

public void setProperty(java.lang.String key,
                        java.lang.String value)

getProperty

public java.lang.String getProperty(java.lang.String key)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getDate

public Date getDate()
Get the date of the program. Prefer this method over getProgram().getDate().

Returns:
date of the program
Since:
3.0

getStartTime

public int getStartTime()
get the start time of the program in minutes after midnight

Returns:
start time of the program
Since:
3.0

compareTo

public int compareTo(ProgramItem other)
Specified by:
compareTo in interface java.lang.Comparable<ProgramItem>

TV-Browser 3.3.3 API

TV-Browser 3.3.3, Copyright (C) 2004-2008 TV-Browser Team (dev@tvbrowser.org)