* Lexicographical comparison of programs based on (time, title, channel).
*
*/
- public static class TimeSorter implements Comparator<Program> {
+ public static class TimeComparator implements Comparator<Program> {
/**
* Lexicographical comparison based on start time, program name, and
/**
* Successfully recorded.
*/
- OK("Successfully recorded programs"),
+ OK,
/**
* Already recorded program.
*/
- DUPLICATE("Already recorded programs"),
+ DUPLICATE,
/**
* Recording conflict with another program.
*/
- CONFLICT("Programs in conflict with another recorded program"),
+ CONFLICT,
/**
* Program occurred in the past.
*/
- OLDSHOW("Programs that occurred in the past"),
+ OLDSHOW,
/**
* Program could not be recorded for technical reasons.
*/
- ERROR("Programs that could not be recorded for technical reasons");
-
- private String _description;
-
- private RecordingResult(String aDescription) {
- _description = aDescription;
- }
-
- /**
- * Gets the description.
- *
- * @return Description.
- */
- public String getDescription() {
- return _description;
- }
+ ERROR;
};
/**
*/
public boolean isRecordingPossible() {
try {
- Action record = _programInfo.execute().getAction(RECORD_ACTION);
- if (record == null) {
- return false;
- }
- return true;
+ return _programInfo.execute().getAction(RECORD_ACTION) != null;
} catch (PageException e) {
return false;
}