- Type Parameters:
S
- element type of the underlying collection
T
- element type of filtered collection (and subclass of S). The predicate
must accept only objects of type T.
- All Implemented Interfaces:
- java.lang.Iterable<T>, java.util.Collection<T>
- Direct Known Subclasses:
- FilteredCollection
public class SubclassFilteredCollection<S,T extends S>
extends java.util.AbstractCollection<T>
Filtered view of a collection.
(read-only collection, but elements can be changed, of course)
Lets you iterate through those elements of a given collection that satisfy a
certain condition (imposed by a predicate).