|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IProgramInfoFilter
A program-filter can be used to filter programs from a program-list.
// get a list of all recordings IProgramInfoList allRecordings = backend.queryRecordings(); // define a new duration filter IProgramInfoFilter durationFilter = new IProgramInfoFilter() { public boolean accept(IProgramInfo program) { return (program.getDuration() > 60); } }; // filter recordings IProgramInfoList filteredRecordings = allRecordings.filter(durationFilter); // print out all matching recordings for(IProgramInfo program : filteredRecordings) { System.out.println(String.format( "%s (%d minutes)", program.getFullTitle(), program.getDuration() )); }
ProgramInfoFilters for a list of all predefined filters.
IRecordings.getProgramInfoList(IProgramInfoFilter),
IRecordings.iterator(IProgramInfoFilter),
IProgramInfoList.filter(IProgramInfoFilter),
IProgramInfoList.groupBy(org.jmythapi.protocol.response.IProgramInfo.Props, IProgramInfoFilter)| Method Summary | |
|---|---|
boolean |
accept(IProgramInfo program)
Tests if the filter criteria matches onto the given program. |
| Method Detail |
|---|
boolean accept(IProgramInfo program)
accept in interface IFilter<IProgramInfo.Props,IProgramInfo>program - the program that should be tested
true if the given program is accepted by the filter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||