Similar to {@link #next()}, but returns a {@link Record} object, that may include metadata such as the source
of the data

@return next record
328558
@Override
    public Record nextRecord() {
        if(!hasNext()){ //Also triggers prefetch
            throw new NoSuchElementException("No next element");
        }
        Record toRet = next;
        next = null;
        return toRet;
    }
366444
@Override
    public E next()
    {
        if (!checkOnFetchSize() || scrollComplete)
        {
            throw new NoSuchElementException("Nothing to scroll further for:" + entityMetadata.getEntityClazz());
        }
        E result = (E) handler.next(entityMetadata, columns);
        if (!entityMetadata.isRelationViaJoinTable()
                && (entityMetadata.getRelationNames() == null || (entityMetadata.getRelationNames().isEmpty())))
        {
            return result;
        }
        else
        {
            return result = setRelationEntities(result, client, entityMetadata);
        }
    }
166638
private boolean readNextRecord() throws IOException {
		boolean recordFound = false;
		while (!recordFound) {
			// no more records left
			if (numReadRecords >= numTotalRecords) {
				return false;
			}

			try {
				if (numReadRecords == numRecordsUpToCurrentBlock) {
					// advance to next block
					PageReadStore pages = reader.readNextRowGroup();
					recordReader = createRecordReader(pages);
					numRecordsUpToPreviousBlock = numRecordsUpToCurrentBlock;
					numRecordsUpToCurrentBlock += pages.getRowCount();
					currentBlock++;
				}

				numReadRecords++;
				try {
					readRecord = recordReader.read();
					readRecordReturned = false;
				} catch (RecordMaterializationException e) {
					String errorMessage = String.format(
						"skipping a corrupt record in block number [%d] record number [%s] of file %s",
						currentBlock, numReadRecords - numRecordsUpToPreviousBlock, reader.getFile());

					if (!skipCorruptedRecord) {
						LOG.error(errorMessage);
						throw e;
					} else {
						LOG.warn(errorMessage);
					}
					continue;
				}

				if (readRecord == null) {
					readRecordReturned = true;
					numReadRecords = numRecordsUpToCurrentBlock;
					LOG.debug("filtered record reader reached end of block");
					continue;
				}

				recordFound = true;
				LOG.debug("read value: {}", readRecord);
			} catch (RecordMaterializationException e) {
				LOG.error(String.format("Can not read value at %d in block %d in file %s",
					numReadRecords - numRecordsUpToPreviousBlock, currentBlock, reader.getFile()), e);
				if (!skipCorruptedRecord) {
					throw e;
				}
				return false;
			}
		}

		return true;
	}
1072132
public Record
nextRecord() throws IOException {
	Record rec = null;
	try {
		rec = _nextRecord();
	}
	finally {
		if (rec == null) {
			st.close();
		}
	}
	return rec;
}
443834
@Override
    public Object next() {
        try {
            mEvent = nextEvent();
        } catch (final XMLStreamException exc) {
            exc.printStackTrace();
        }

        return mEvent;
    }
309141
public Versioned<E> next() {
        if(!hasNext())
            throw new NoSuchElementException();

        Versioned<VListNode<E>> tmpNode = _nextNode;
        VListNode<E> tmpNodeValue = _nextNode.getValue();
        _lastId = tmpNodeValue.getId();
        _lastCall = LastCall.NEXT;

        if(tmpNodeValue.getNextId() != VStack.NULL_ID) {
            _nextNode = _stack.getListNode(tmpNodeValue.getNextId());
        } else {
            _nextNode = null;
        }

        _previousNode = tmpNode;
        _isPreviousSet = true;

        return new Versioned<E>(tmpNodeValue.getValue(), tmpNode.getVersion());
    }
1271491
public Object next()
    {
        _current1.reset();
        if (_last1.key() == null)
            findFirst(_dstack);
        else
        {
            findNext(_dstack);
            if (_current1.key() == null)
                _eof = true;
        }

        if (_current1.key() != null)
            _last1.setLocation(_current1);

        return _current1.key();
    }
208415
public long firstRecordSequenceNumber()
    {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "firstRecordSequenceNumber", this);
        if (tc.isEntryEnabled())
            Tr.exit(tc, "firstRecordSequenceNumber", new Long(_firstRecordSequenceNumber));
        return _firstRecordSequenceNumber;
    }
1152327
public Object[] nextRecord() {
        try {
            int nextByte;
            do {
                nextByte = dataInput.readByte();
                if (nextByte == DATA_ENDED) {
                    return null;
                } else if (nextByte == DATA_DELETED) {
                    dataInput.skipBytes(header.getRecordLength() - 1);
                }
            } while (nextByte == DATA_DELETED);

            Object recordObjects[] = new Object[header.getFieldsCount()];
            for (int i = 0; i < header.getFieldsCount(); i++) {
                recordObjects[i] = readFieldValue(header.getField(i));
            }
            return recordObjects;
        } catch (EOFException e) {
            return null; // we currently end reading file
        } catch (IOException e) {
            throw new DbfException("Cannot read next record form Dbf file", e);
        }
    }
1043656
public E next() {
		if(!hasNext()) {
			throw new NoSuchElementException();
		}
		E retObject = next;
		next = null;
		return retObject;
	}
315756
@Override
    public List<Writable> next() {
        if(!hasNext()){ //Also triggers prefetch
            throw new NoSuchElementException("No next element");
        }
        List<Writable> out = next.getRecord();
        next = null;
        return out;
    }
804086
public String next() {
        if (!hasNext()) {
            throw new NoSuchElementException();
        }

        String next = this.next;
        this.next = fetchNext();

        return next;
    }
198783
public Object next()
    {
        String result = null;

        if ( _literal != null )
        {
            result = _literal;
            _literal = null;
        }
        else if ( _token != null )
        {
            result = _token;
            _token = null;
        }
        return result;
    }
875913
public Object next() {
        try {
            if (!_primed) {
                _primed = _rs.next();
                if (!_primed) {
                    throw new NoSuchElementException();
                }
            }
            // reset upon consumption
            _primed = false;
            return _rowMapper.mapRowToReturnType();
        } catch (SQLException e) {
            // Since Iterator interface is locked, all we can do
            // is put the real exception inside an expected one.
            NoSuchElementException xNoSuch = new NoSuchElementException("ResultSet exception: " + e);
            xNoSuch.initCause(e);
            throw xNoSuch;
        }
    }
279760
@Override
    public DataFrameRecord<T> getNext() throws DataCorruptionException, DurableDataLogException {
        Exceptions.checkNotClosed(this.closed, closed);

        try {
            while (!this.dataFrameInputStream.isClosed()) {
                try {
                    if (!this.dataFrameInputStream.beginRecord()) {
                        // We've reached the end of the DataFrameInputStream.
                        return null;
                    }

                    // Attempt to deserialize the next record. If the serialization was bad, this will throw an exception which we'll pass along.
                    T logItem = this.serializer.deserialize(this.dataFrameInputStream);
                    DataFrameRecord.RecordInfo recordInfo = this.dataFrameInputStream.endRecord();
                    long seqNo = logItem.getSequenceNumber();
                    if (seqNo <= this.lastReadSequenceNumber) {
                        throw new DataCorruptionException(String.format("Invalid Operation Sequence Number. Expected: larger than %d, found: %d.",
                                this.lastReadSequenceNumber, seqNo));
                    }

                    this.lastReadSequenceNumber = seqNo;
                    return new DataFrameRecord<>(logItem, recordInfo);
                } catch (DataFrameInputStream.RecordResetException | DataFrameInputStream.NoMoreRecordsException ex) {
                    // We partially "deserialized" a record, but realized it was garbage (a product of a failed, partial
                    // serialization). Discard whatever we have and try again.
                } catch (IOException ex) {
                    // This catches all EOFExceptions, EndOfRecordExceptions and SerializationExceptions too.
                    // Any other exceptions are considered to be non-DataCorruption.
                    throw new DataCorruptionException("Deserialization failed.", ex);
                }
            }

            // No more data.
            return null;
        } catch (Exception ex) {
            // If we encountered any kind of reader exception, close the reader right away.
            // We do not do retries at this layer. Retries should be handled by the DataLog.
            // At this time, we close the reader for any kind of exception. In the future, we may decide to only do this
            // for critical exceptions, such as DataCorruptionException or DataLogNotAvailableException, but be able
            // to recover from other kinds of exceptions.
            // Since there are many layers of iterators (DataFrame, DataFrameRecord, LogItems), handling an exception at
            // the very top level is problematic, mostly because we would have to "rewind" some of the other iterators
            // to a previous position, otherwise any retries may read the wrong data.
            close();
            throw ex;
        }
    }
669305
@SuppressWarnings("unchecked")
	public REC next() {
		checkDirection(true);

		ORecordInternal<?> record = getRecord();

		// ITERATE UNTIL THE NEXT GOOD RECORD
		while (hasNext()) {
			record = getTransactionEntry();
			if (record != null)
				return (REC) record;

			if ((record = readCurrentRecord(null, +1)) != null)
				// FOUND
				return (REC) record;
		}

		throw new NoSuchElementException();
	}
569198
public LabeledParsedDocument next() {
        if (nextDoc == null)
            throw new NoSuchElementException("No further documents");
        LabeledParsedDocument next = nextDoc;
        while (true) {
            try {
                advance();
                break;
            } 
            // Case for if we didn't property read the line
            catch (IOException ioe) {
                throw new IOError(ioe);
            } 
            // Some lines in the PukWaC are corrupted due to missing characters.
            // We silently catch these errors here and try to advance further to
            // the next parse tree.  Note that if none further exist, advance
            // will still return and we will break from the loop.
            catch (Exception e) {

            }
        }
        return next;
    }