/** * {@inheritDoc} */ public T next() { if (hasNext()) { T result; result = nextElement; nextElement = null; return result; } else { throw new NoSuchElementException(); } }
/** * Iterates over the entire stream of data. * * @param offset * The location in the storage file to begin reading. * @return An iterator for reading objects from the data store. This * iterator must be released after use. */ public Iterator<T> iterate(long offset) { seek(offset); return new ObjectDataInputIterator<T>(objectReader); }
/** * Iterates over the entire stream of data. * * @param offset * The location in the storage file to begin reading. * @return An iterator for reading objects from the data store. This * iterator must be released after use. */ public Iterator<T> iterate(long offset) { seek(offset); return new ObjectDataInputIterator<T>(objectReader); }
/** * {@inheritDoc} */ public T next() { if (hasNext()) { T result; result = nextElement; nextElement = null; return result; } else { throw new NoSuchElementException(); } }