filter


Description:

[ CCode ( ordering = 5 ) ]
public virtual Iterator<G> filter (owned Predicate<G> pred)

Creates a new iterator that contains only values that fullfills the predicate.

Note:

When the method is called on Iterator using the parent iterator is not allowed befor the inner iterator Iterator.next return false and then it points on its last element. The resulting iterator is Iterator.valid if parent iterator is Iterator.valid and value it is pointing on fullfills the predicate.

Parameters:

pred

predicate to check should the value be retained

Returns:

Iterator containing values of subsequent values of seed