TV-Browser 2.7.5 API

captureplugin.drivers.utils
Class ProgramTime

java.lang.Object
  extended by captureplugin.drivers.utils.ProgramTime
All Implemented Interfaces:
Cloneable

public class ProgramTime
extends Object
implements Cloneable

A combination of Start/End-Time and the Program


Constructor Summary
ProgramTime()
          Create ProgramTime
ProgramTime(Program prg)
          Create ProgramTime
ProgramTime(Program prg, Date start, Date end)
          Create ProgramTime
ProgramTime(ProgramTime time)
          Create ProgramTime
 
Method Summary
 void addMinutesToEnd(int min)
          Add Minutes to End-Time
 void addMinutesToStart(int min)
          Add Minutes to the Start-Time
 boolean checkIfRemovedOrUpdateInstead()
          Checks if the program of this ProgramTime was deleted or if it has not updated instead renew the instance of it.
 Object clone()
          Clone
 Date getEnd()
          Returns the End-Time
 Calendar getEndAsCalendar()
           
 int getLength()
          Calculates the time difference between start and end in minutes
 Program getProgram()
          Returns the Program
 Date getStart()
          Returns the Start-Time
 Calendar getStartAsCalendar()
          Returns the Start-Time as Calendar
 String getTitle()
          Get the Title
 void readData(ObjectInputStream in)
          Read Data from Stream
 void setEnd(Date end)
          Sets the End-Time
 void setProgram(Program prg)
          Sets the Program
 void setStart(Date start)
          Set the Start-Time
 void setTitle(String title)
          Seth the Title
 void writeData(ObjectOutputStream out)
          Save Data into Stream
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProgramTime

public ProgramTime()
Create ProgramTime


ProgramTime

public ProgramTime(Program prg)
Create ProgramTime

Parameters:
prg - Program

ProgramTime

public ProgramTime(Program prg,
                   Date start,
                   Date end)
Create ProgramTime

Parameters:
prg - Program
start - Start-Time
end - End-Time

ProgramTime

public ProgramTime(ProgramTime time)
Create ProgramTime

Parameters:
time - copy from this ProgramTime
Method Detail

setProgram

public void setProgram(Program prg)
Sets the Program

Parameters:
prg - Program

getProgram

public Program getProgram()
Returns the Program

Returns:
Program

setStart

public void setStart(Date start)
Set the Start-Time

Parameters:
start - new start-time

getStart

public Date getStart()
Returns the Start-Time

Returns:
current start-time

getStartAsCalendar

public Calendar getStartAsCalendar()
Returns the Start-Time as Calendar

Returns:
current start-time

setEnd

public void setEnd(Date end)
Sets the End-Time

Parameters:
end - new end-time

getEnd

public Date getEnd()
Returns the End-Time

Returns:
current end-time

getEndAsCalendar

public Calendar getEndAsCalendar()
Returns:
current end-time as calendar

addMinutesToStart

public void addMinutesToStart(int min)
Add Minutes to the Start-Time

Parameters:
min - Minutes to add

addMinutesToEnd

public void addMinutesToEnd(int min)
Add Minutes to End-Time

Parameters:
min - Minutes to add

getTitle

public String getTitle()
Get the Title

Returns:
Title

setTitle

public void setTitle(String title)
Seth the Title

Parameters:
title - new Title

clone

public Object clone()
Clone

Overrides:
clone in class Object

writeData

public void writeData(ObjectOutputStream out)
               throws IOException
Save Data into Stream

Parameters:
out - save to this stream
Throws:
IOException - problems during save operation

readData

public void readData(ObjectInputStream in)
              throws IOException,
                     ClassNotFoundException
Read Data from Stream

Parameters:
in - read data from this stream
Throws:
IOException - problems during load operation
ClassNotFoundException - problem during class creation

checkIfRemovedOrUpdateInstead

public boolean checkIfRemovedOrUpdateInstead()
Checks if the program of this ProgramTime was deleted or if it has not updated instead renew the instance of it.

Returns:
true if the program was deleted, false instead.
Since:
2.11

getLength

public int getLength()
Calculates the time difference between start and end in minutes

Returns:
Time in Minutes between start and end Īsince 2.6.1

TV-Browser 2.7.5 API

TV-Browser 2.7.5, Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)