pred
.functional :: FilterIter :: _pred
functional :: FilterIter :: defaultinit
functional :: FilterIter :: pred
functional :: FilterIter :: pred=
functional $ FilterIter :: SELF
Type of this instance, automatically specialized in every classfunctional $ FilterIter :: init
functional :: FilterIter :: _pred
core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
functional :: FunIter :: defaultinit
core :: Object :: defaultinit
core :: Iterator :: defaultinit
functional :: FilterIter :: defaultinit
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
core :: Object :: native_class_name
The class name of the object in CString format.Iterator
whose elements are sorted by the function
core :: Object :: output_class_name
Display class name on stdout (debug only).functional :: FilterIter :: pred
functional :: FilterIter :: pred=
# An tierator that filter its element by a predicate `pred`.
class FilterIter[E]
super FunIter[E,nullable E]
var pred: Fun1[E, Bool]
redef init
do
if is_ok and not pred.call(my_iter.item) then next
end
redef fun item
do
assert is_ok
return my_iter.item
end
redef fun next
do
loop
my_iter.next
if not is_ok then
break
end
var x = my_iter.item
if pred.call(x) then
break
end
end
end
end
lib/functional/iter_extras.nit:279,1--308,3