|
CachingIterator::hasNextCheck whether the inner iterator has a valid next element Description
public bool CachingIterator::hasNext()
Checks whether there is an element after the current one. As the CachingIterator is one element ahead of its inner iterator, this checks whether the inner iterator is valid, which makes it possible to tell whether the current element is the last one before moving past it. ParametersThis function has no parameters. Return Values
Returns ExamplesExample #1 Detecting the last element The above example will output: apple, banana, cherry See Also
|