org.ocap.shared.dvr.navigation
Class RecordingStateFilter

java.lang.Object
  extended by org.ocap.shared.dvr.navigation.RecordingListFilter
      extended by org.ocap.shared.dvr.navigation.RecordingStateFilter

public class RecordingStateFilter
extends RecordingListFilter

Filter to filter based on values returned by the getState method in RecordingRequest.


Constructor Summary
RecordingStateFilter(int state)
          Constructs the filter based on a particular state type (PENDING, FAILED, etc.).
 
Method Summary
 boolean accept(RecordingRequest entry)
          Tests if the given RecordingRequest passes the filter.
 int getFilterValue()
          Reports the value of state used to create this filter.
 
Methods inherited from class org.ocap.shared.dvr.navigation.RecordingListFilter
getCascadingFilter, setCascadingFilter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecordingStateFilter

public RecordingStateFilter(int state)
Constructs the filter based on a particular state type (PENDING, FAILED, etc.).

Parameters:
state - Value for matching the state of a RecordingRequest instance.
Method Detail

getFilterValue

public int getFilterValue()
Reports the value of state used to create this filter.

Returns:
The value of state used to create this filter.

accept

public boolean accept(RecordingRequest entry)
Tests if the given RecordingRequest passes the filter.

Specified by:
accept in class RecordingListFilter
Parameters:
entry - An individual RecordingRequest to be evaluated against the filtering algorithm.
Returns:
true if RecordingRequest contained within the RecordingRequest parameter is in the state indicated by the filter value; false otherwise.