filter


Description:

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

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

Note:

When the method is called on Iterator using the parent iterator is not allowed before 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 at fulfills the predicate.

Parameters:

pred

predicate to check should the value be retained

Returns:

Iterator containing values of subsequent values of seed




2022 vala-language.org