org.gcube.contentmanagement.gcubedocumentlibrary.streams.filters
Interface Filter<FROM,TO>

Type Parameters:
FROM - the type of elements iterated over.
TO - the type of elements filtered during the iteration.
All Known Implementing Classes:
Processor

public interface Filter<FROM,TO>

A filter for the elements of an adapted iteration.

Author:
Fabio Simeoni (University of Strathclyde)

Method Summary
 TO apply(FROM element)
          Applies the filter to elements of the iteration.
 

Method Detail

apply

TO apply(FROM element)
         throws java.lang.Exception
Applies the filter to elements of the iteration.

Parameters:
element - the last element produced by the iteration.
Returns:
the element that should be returned instead.
Throws:
java.lang.Exception - if the filter could not be applied.