- java.lang.Object
-
- 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
Constructors Constructor Description ProgramItem()
ProgramItem(Program prog)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 midnightvoid
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.
-
-
-
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 streamjava.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 classjava.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 interfacejava.lang.Comparable<ProgramItem>
-
-