core :: CachedIterator :: current_item
If not, the cache is effectively filled (with next_item
).
Return null
iff there is no more elements.
# The current item, if any.
# If not, the cache is effectively filled (with `next_item`).
# Return `null` iff there is no more elements.
protected fun current_item: nullable E
do
var cache = self.cache
if cache != null then return cache
cache = next_item
self.cache = cache
return cache
end
lib/core/collection/abstract_collection.nit:325,2--335,4