org.rightcollections
Interface Filterable<E>

Type Parameters:
E - type of elements for filtering
All Known Subinterfaces:
RightCollection<E>, RightList<E>, RightSet<E>
All Known Implementing Classes:
AbstractRightCollection, RightCollectionImpl, RightListImpl, RightSetImpl

public interface Filterable<E>

Collection can implement this interface if it supports filtering of its elements.

Author:
Ruslan Pilin

Method Summary
 void filter(Predicate<E> predicate)
          Filters collection by predicate.
 

Method Detail

filter

void filter(Predicate<E> predicate)
Filters collection by predicate. (removes elemets where predicate(element) = false)

Parameters:
predicate - to apply to each element of collection.


Copyright © 2009 Ruslan Pilin. All Rights Reserved.