org.ocap.shared.dvr.navigation
Interface RecordingList


public interface RecordingList

RecordingList represents a list of recordings.


Method Summary
 boolean contains(RecordingRequest entry)
          Tests if the indicated RecordingRequest object is contained in the list.
 RecordingListIterator createRecordingListIterator()
          Generates an iterator on the RecordingRequest elements in this list.
 RecordingList filterRecordingList(RecordingListFilter filter)
          Creates a new RecordingList object that is a subset of this list, based on the conditions specified by a RecordingListFilter object.
 RecordingRequest getRecordingRequest(int index)
          Reports the RecordingRequest at the specified index position.
 int indexOf(RecordingRequest entry)
          Reports the position of the first occurrence of the indicated RecordingRequest object in the list.
 int size()
          Reports the number of RecordingRequest objects in the list.
 RecordingList sortRecordingList(RecordingListComparator sortCriteria)
          Creates a new RecordingList that contains all the elements of this list sorted according to the criteria specified by a RecordingListComparator.
 

Method Detail

filterRecordingList

RecordingList filterRecordingList(RecordingListFilter filter)
Creates a new RecordingList object that is a subset of this list, based on the conditions specified by a RecordingListFilter object. This method may be used to generate increasingly specialized lists of RecordingRequest objects based on multiple filtering criteria. If the filter is null, the resulting RecordingList will be a duplicate of this list.

Note that the accept method of the given RecordingListFilter will be invoked for each RecordingRequest to be filtered using the same application thread that invokes this method.

Parameters:
filter - A filter constraining the requested recording list, or null.
Returns:
A RecordingList object created based on the specified filtering rules.

createRecordingListIterator

RecordingListIterator createRecordingListIterator()
Generates an iterator on the RecordingRequest elements in this list.

Returns:
A RecordingListIterator on the RecordingRequests in this list.

contains

boolean contains(RecordingRequest entry)
Tests if the indicated RecordingRequest object is contained in the list.

Parameters:
entry - The RecordingRequest object for which to search.
Returns:
true if the specified RecordingRequest is a member of the list; false otherwise.

indexOf

int indexOf(RecordingRequest entry)
Reports the position of the first occurrence of the indicated RecordingRequest object in the list.

Parameters:
entry - The RecordingRequest object for which to search.
Returns:
The index of the first occurrence of the entry, or -1 if entry is not contained in the list.

size

int size()
Reports the number of RecordingRequest objects in the list.

Returns:
The number of RecordingRequest objects in the list.

getRecordingRequest

RecordingRequest getRecordingRequest(int index)
Reports the RecordingRequest at the specified index position.

Parameters:
index - A position in the RecordingList.
Returns:
The RecordingRequest at the specified index.
Throws:
java.lang.IndexOutOfBoundsException - If index < 0 or index > size()-1.

sortRecordingList

RecordingList sortRecordingList(RecordingListComparator sortCriteria)
Creates a new RecordingList that contains all the elements of this list sorted according to the criteria specified by a RecordingListComparator.

Parameters:
sortCriteria - the sort criteria to be applied to sort the entries in the recording list.
Returns:
A sorted copy of the recording list.