Methods Summary |
---|
public int | compareTo(java.lang.Object obj)
Show rhs = (Show) obj;
int comparison = this.startTime.compareTo(rhs.startTime);
if (comparison == 0) {
if (this.channel < rhs.channel) {
comparison = -1;
} else if (this.channel > rhs.channel) {
comparison = 1;
}
}
return comparison;
|
public boolean | equals(java.lang.Object obj)
if (obj instanceof Show) {
Show rhs = (Show) obj;
return this.startTime.equals(rhs.startTime)
&& this.channel == rhs.channel;
}
return false;
|
public int | getChannel()
return this.channel;
|
public java.util.Date | getEndTime()
return this.endTime;
|
public java.util.Date | getStartTime()
return this.startTime;
|
public java.lang.String | getTitle()
return this.title;
|
public java.lang.String | toString()
SimpleDateFormat sdf = new SimpleDateFormat("hh:mm");
return "Channel " + this.channel
+ " from "
+ sdf.format(this.startTime) + " to "
+ sdf.format(this.endTime)
+ ": " + this.title;
|