Module tvbrowser
Package devplugin

Class 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 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>