Merged the 'hasNext' and 'next' semantics.