CachingIterator::valid

Check whether the current element is valid

Description

public bool CachingIterator::valid()

Checks whether the current element is valid.

A CachingIterator has no current element until CachingIterator::rewind is called, which foreach does automatically.

Parameters

This function has no parameters.

Return Values

Returns true if the current element is valid, false otherwise.

See Also

  • CachingIterator::hasNext
  • CachingIterator::rewind